this is about the amount -Wl,--gc-sections can help me to eliminate
This commit is contained in:
parent
d72669c66b
commit
45cd3a340b
22
histrap.c
22
histrap.c
@ -26,7 +26,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.108 2011/03/07 20:30:38 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.109 2011/04/22 12:21:53 tg Exp $");
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* MirOS: This is the default mapping type, and need not be specified.
|
* MirOS: This is the default mapping type, and need not be specified.
|
||||||
@ -526,26 +526,6 @@ findhist(int start, int fwd, const char *str, int anchored)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
findhistrel(const char *str)
|
|
||||||
{
|
|
||||||
int maxhist = histptr - history;
|
|
||||||
int start = maxhist - 1;
|
|
||||||
int rec;
|
|
||||||
|
|
||||||
getn(str, &rec);
|
|
||||||
if (rec == 0)
|
|
||||||
return (-1);
|
|
||||||
if (rec > 0) {
|
|
||||||
if (rec > maxhist)
|
|
||||||
return (-1);
|
|
||||||
return (rec - 1);
|
|
||||||
}
|
|
||||||
if (rec > maxhist)
|
|
||||||
return (-1);
|
|
||||||
return (start + rec + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set history
|
* set history
|
||||||
* this means reallocating the dataspace
|
* this means reallocating the dataspace
|
||||||
|
21
jobs.c
21
jobs.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.77 2011/03/13 01:20:20 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.78 2011/04/22 12:21:54 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
#define mksh_killpg killpg
|
#define mksh_killpg killpg
|
||||||
@ -861,25 +861,6 @@ j_stopped_running(void)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
j_njobs(void)
|
|
||||||
{
|
|
||||||
Job *j;
|
|
||||||
int nj = 0;
|
|
||||||
#ifndef MKSH_NOPROSPECTOFWORK
|
|
||||||
sigset_t omask;
|
|
||||||
|
|
||||||
sigprocmask(SIG_BLOCK, &sm_sigchld, &omask);
|
|
||||||
#endif
|
|
||||||
for (j = job_list; j; j = j->next)
|
|
||||||
nj++;
|
|
||||||
|
|
||||||
#ifndef MKSH_NOPROSPECTOFWORK
|
|
||||||
sigprocmask(SIG_SETMASK, &omask, NULL);
|
|
||||||
#endif
|
|
||||||
return (nj);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* list jobs for jobs built-in */
|
/* list jobs for jobs built-in */
|
||||||
int
|
int
|
||||||
|
7
sh.h
7
sh.h
@ -151,7 +151,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.464 2011/04/22 12:15:40 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.465 2011/04/22 12:21:55 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R39 2011/04/17"
|
#define MKSH_VERSION "R39 2011/04/17"
|
||||||
|
|
||||||
@ -840,9 +840,8 @@ EXTERN sigset_t sm_default, sm_sigchld;
|
|||||||
EXTERN const char *builtin_argv0;
|
EXTERN const char *builtin_argv0;
|
||||||
EXTERN Tflag builtin_flag; /* flags of called builtin (SPEC_BI, etc.) */
|
EXTERN Tflag builtin_flag; /* flags of called builtin (SPEC_BI, etc.) */
|
||||||
|
|
||||||
/* current working directory, and size of memory allocated for same */
|
/* current working directory */
|
||||||
EXTERN char *current_wd;
|
EXTERN char *current_wd;
|
||||||
EXTERN size_t current_wd_size;
|
|
||||||
|
|
||||||
/* Minimum required space to work with on a line - if the prompt leaves less
|
/* Minimum required space to work with on a line - if the prompt leaves less
|
||||||
* space than this on a line, the prompt is truncated.
|
* space than this on a line, the prompt is truncated.
|
||||||
@ -1583,7 +1582,6 @@ void sethistfile(const char *);
|
|||||||
char **histpos(void);
|
char **histpos(void);
|
||||||
int histnum(int);
|
int histnum(int);
|
||||||
int findhist(int, int, const char *, int);
|
int findhist(int, int, const char *, int);
|
||||||
int findhistrel(const char *);
|
|
||||||
char **hist_get_newest(bool);
|
char **hist_get_newest(bool);
|
||||||
void inittraps(void);
|
void inittraps(void);
|
||||||
void alarm_init(void);
|
void alarm_init(void);
|
||||||
@ -1616,7 +1614,6 @@ int j_kill(const char *, int);
|
|||||||
int j_resume(const char *, int);
|
int j_resume(const char *, int);
|
||||||
#endif
|
#endif
|
||||||
int j_jobs(const char *, int, int);
|
int j_jobs(const char *, int, int);
|
||||||
int j_njobs(void);
|
|
||||||
void j_notify(void);
|
void j_notify(void);
|
||||||
pid_t j_async(void);
|
pid_t j_async(void);
|
||||||
int j_stopped_running(void);
|
int j_stopped_running(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user