* more static'ing.
* syslex.l (word, number, unit): Remove unused variables. * nlmheader.y (keyword_tokens): Make static. * coffdump.c (dump_coff_symbol, coff_dump): Make static. * coffgrok.c (lofile, last_function_symbol, last_function_type, last_struct, last_enum, cur_sfile): Make variables static. * sysdump.c (getCHARS, fillup, getBARRAY, getINT, getBITS, sysroff_swap_tr_in, sysroff_print_tr_out): Make static. * sysinfo.y (writecode, it, code, repeat, oldrepeat, name, rdepth, names, pnames): Likewise.
This commit is contained in:
parent
4aac130b28
commit
89b788963f
7 changed files with 37 additions and 45 deletions
|
@ -1,3 +1,15 @@
|
|||
2005-04-29 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* syslex.l (word, number, unit): Remove unused variables.
|
||||
* nlmheader.y (keyword_tokens): Make static.
|
||||
* coffdump.c (dump_coff_symbol, coff_dump): Make static.
|
||||
* coffgrok.c (lofile, last_function_symbol, last_function_type,
|
||||
last_struct, last_enum, cur_sfile): Make variables static.
|
||||
* sysdump.c (getCHARS, fillup, getBARRAY, getINT, getBITS,
|
||||
sysroff_swap_tr_in, sysroff_print_tr_out): Make static.
|
||||
* sysinfo.y (writecode, it, code, repeat, oldrepeat, name, rdepth,
|
||||
names, pnames): Likewise.
|
||||
|
||||
2005-04-29 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* ar.c (mri_mode): Make static.
|
||||
|
|
|
@ -38,11 +38,9 @@ static void dump_coff_lines (struct coff_line *);
|
|||
static void dump_coff_type (struct coff_type *);
|
||||
static void dump_coff_where (struct coff_where *);
|
||||
static void dump_coff_visible (struct coff_visible *);
|
||||
extern void dump_coff_symbol (struct coff_symbol *);
|
||||
static void dump_coff_scope (struct coff_scope *);
|
||||
static void dump_coff_sfile (struct coff_sfile *);
|
||||
static void dump_coff_section (struct coff_section *);
|
||||
extern void coff_dump (struct coff_ofile *);
|
||||
static void show_usage (FILE *, int);
|
||||
extern int main (int, char **);
|
||||
|
||||
|
@ -325,7 +323,7 @@ dump_coff_visible (struct coff_visible *p)
|
|||
tab (-1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dump_coff_symbol (struct coff_symbol *p)
|
||||
{
|
||||
tab (1);
|
||||
|
@ -436,7 +434,7 @@ dump_coff_section (struct coff_section *ptr)
|
|||
tab (-1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
coff_dump (struct coff_ofile *ptr)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -33,16 +33,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#include "coff/internal.h"
|
||||
#include "../bfd/libcoff.h"
|
||||
#include "coffgrok.h"
|
||||
int lofile = 1;
|
||||
static int lofile = 1;
|
||||
static struct coff_scope *top_scope;
|
||||
static struct coff_scope *file_scope;
|
||||
static struct coff_ofile *ofile;
|
||||
|
||||
struct coff_symbol *last_function_symbol;
|
||||
struct coff_type *last_function_type;
|
||||
struct coff_type *last_struct;
|
||||
struct coff_type *last_enum;
|
||||
struct coff_sfile *cur_sfile;
|
||||
static struct coff_symbol *last_function_symbol;
|
||||
static struct coff_type *last_function_type;
|
||||
static struct coff_type *last_struct;
|
||||
static struct coff_type *last_enum;
|
||||
static struct coff_sfile *cur_sfile;
|
||||
|
||||
static struct coff_symbol **tindex;
|
||||
|
||||
|
|
|
@ -586,7 +586,7 @@ struct keyword_tokens_struct
|
|||
int token;
|
||||
};
|
||||
|
||||
struct keyword_tokens_struct keyword_tokens[] =
|
||||
static struct keyword_tokens_struct keyword_tokens[] =
|
||||
{
|
||||
{ "CHECK", CHECK },
|
||||
{ "CODESTART", CODESTART },
|
||||
|
|
|
@ -54,16 +54,9 @@ static void derived_type (void);
|
|||
static void module (void);
|
||||
static void show_usage (FILE *, int);
|
||||
|
||||
extern char *getCHARS (unsigned char *, int *, int, int);
|
||||
extern int fillup (unsigned char *);
|
||||
extern barray getBARRAY (unsigned char *, int *, int, int);
|
||||
extern int getINT (unsigned char *, int *, int, int);
|
||||
extern int getBITS (unsigned char *, int *, int, int);
|
||||
extern void sysroff_swap_tr_in (void);
|
||||
extern void sysroff_print_tr_out (void);
|
||||
extern int main (int, char **);
|
||||
|
||||
char *
|
||||
static char *
|
||||
getCHARS (unsigned char *ptr, int *idx, int size, int max)
|
||||
{
|
||||
int oc = *idx / 8;
|
||||
|
@ -120,7 +113,7 @@ dh (unsigned char *ptr, int size)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
fillup (unsigned char *ptr)
|
||||
{
|
||||
int size;
|
||||
|
@ -143,7 +136,7 @@ fillup (unsigned char *ptr)
|
|||
return size - 1;
|
||||
}
|
||||
|
||||
barray
|
||||
static barray
|
||||
getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
|
||||
int max ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
@ -161,7 +154,7 @@ getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
|
|||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
getINT (unsigned char *ptr, int *idx, int size, int max)
|
||||
{
|
||||
int n = 0;
|
||||
|
@ -197,7 +190,7 @@ getINT (unsigned char *ptr, int *idx, int size, int max)
|
|||
return n;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
getBITS (unsigned char *ptr, int *idx, int size, int max)
|
||||
{
|
||||
int byte = *idx / 8;
|
||||
|
@ -262,7 +255,7 @@ pbarray (barray *y)
|
|||
|
||||
#define IT_tr_CODE 0x7f
|
||||
|
||||
void
|
||||
static void
|
||||
sysroff_swap_tr_in (void)
|
||||
{
|
||||
unsigned char raw[255];
|
||||
|
@ -271,7 +264,7 @@ sysroff_swap_tr_in (void)
|
|||
fillup (raw);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
sysroff_print_tr_out (void)
|
||||
{
|
||||
itheader ("tr", IT_tr_CODE);
|
||||
|
|
|
@ -21,22 +21,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern char *word;
|
||||
extern char writecode;
|
||||
extern int number;
|
||||
extern int unit;
|
||||
char nice_name[1000];
|
||||
char *it;
|
||||
int sofar;
|
||||
int width;
|
||||
int code;
|
||||
char * repeat;
|
||||
char *oldrepeat;
|
||||
char *name;
|
||||
int rdepth;
|
||||
char *loop [] = {"","n","m","/*BAD*/"};
|
||||
char *names[] = {" ","[n]","[n][m]"};
|
||||
char *pnames[]= {"","*","**"};
|
||||
static char writecode;
|
||||
static char *it;
|
||||
static int code;
|
||||
static char * repeat;
|
||||
static char *oldrepeat;
|
||||
static char *name;
|
||||
static int rdepth;
|
||||
static char *names[] = {" ","[n]","[n][m]"};
|
||||
static char *pnames[]= {"","*","**"};
|
||||
|
||||
static int yyerror (char *s);
|
||||
extern int yylex (void);
|
||||
|
@ -415,7 +408,6 @@ enum_list:
|
|||
-c write code to print info in human form */
|
||||
|
||||
int yydebug;
|
||||
char writecode;
|
||||
|
||||
int
|
||||
main (int ac, char **av)
|
||||
|
|
|
@ -27,9 +27,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
#endif
|
||||
#endif
|
||||
#include "sysinfo.h"
|
||||
char *word;
|
||||
int number;
|
||||
int unit;
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
|
|
Loading…
Reference in a new issue