diff -ur on17/usr/src/cmd/abi/spectrans/parser/extends.c bc-on17/usr/src/cmd/abi/spectrans/parser/extends.c --- on17/usr/src/cmd/abi/spectrans/parser/extends.c Tue Jun 14 02:43:29 2005 +++ bc-on17/usr/src/cmd/abi/spectrans/parser/extends.c Mon Jul 11 23:17:18 2005 @@ -43,7 +43,7 @@ * This function is recursive. */ int -do_extends(const Meta_info parentM, const Translator_info *T_info, char *value) +do_extends(const Meta_info *parentM, const Translator_info *T_info, char *value) { static int extends_count = 0; char funname[BUFSIZ], filename[MAXPATHLEN], parentfun[BUFSIZ], @@ -60,7 +60,7 @@ if (extends_count > MAX_EXTENDS) { errlog(ERROR, "\"%s\", line %d: Error: Too many levels of " - "extends\n", parentM.mi_filename, parentM.mi_line_number); + "extends\n", parentM->mi_filename, parentM->mi_line_number); ++errors; goto ret; } @@ -72,7 +72,7 @@ case 2: /* filename not set */ errlog(ERROR, "\"%s\", line %d: Error: Couldn't parse " "'data' or 'function' line\n", - parentM.mi_filename, parentM.mi_line_number); + parentM->mi_filename, parentM->mi_line_number); ++errors; goto ret; break; @@ -96,8 +96,8 @@ f = pathfind(T_info->ti_dash_I, filename, "f"); if (f == NULL) { errlog(ERROR, "\"%s\", line %d: Error: Unable to find spec " - "file \"%s\"\n", parentM.mi_filename, - parentM.mi_line_number, filename); + "file \"%s\"\n", parentM->mi_filename, + parentM->mi_line_number, filename); ++errors; goto ret; } @@ -108,8 +108,8 @@ efp = fopen(ifilename, "r"); if (efp == NULL) { errlog(ERROR, "\"%s\", line %d: Error: Unable to open " - "file \"%s\"\n", parentM.mi_filename, - parentM.mi_line_number, ifilename); + "file \"%s\"\n", parentM->mi_filename, + parentM->mi_line_number, ifilename); free(ifilename); ++errors; goto ret; @@ -165,14 +165,14 @@ if (extends_count == 1) { extends_warn = 1; } - if ((extends_err = do_extends(M, T_info, localvalue)) + if ((extends_err = do_extends(&M, T_info, localvalue)) != 0) { if (extends_count == 1) { errlog(ERROR, "\"%s\", line %d: " "Error occurred while " "processing 'extends'\n", - parentM.mi_filename, - parentM.mi_line_number); + parentM->mi_filename, + parentM->mi_line_number); } errors += extends_err; } @@ -180,8 +180,8 @@ errlog(ERROR, "\"%s\", line %d: " "Warning: \"%s\" does not extend " "a base specification", - parentM.mi_filename, - parentM.mi_line_number, + parentM->mi_filename, + parentM->mi_line_number, funname); } break; @@ -225,8 +225,8 @@ "Error: Interface is missing \"end\"\n" "\"%s\", line %d: Error while processing " "%s\n", M.mi_filename, M.mi_line_number, - parentM.mi_filename, - parentM.mi_line_number, ifilename); + parentM->mi_filename, + parentM->mi_line_number, ifilename); ++errors; goto end; break; @@ -236,7 +236,7 @@ "uninteresting keyword: %s\n", key); break; default: - retval = xlator_take_kvpair(M, ki, localvalue); + retval = xlator_take_kvpair(&M, ki, localvalue); if (retval) { if (T_info->ti_verbosity >= STATUS) errlog(STATUS, @@ -250,8 +250,8 @@ } } else { errlog(ERROR, "\"%s\", line %d: Error: Unable to find " - "function %s in %s\n", parentM.mi_filename, - parentM.mi_line_number, parentfun, ifilename); + "function %s in %s\n", parentM->mi_filename, + parentM->mi_line_number, parentfun, ifilename); ++errors; } end: diff -ur on17/usr/src/cmd/abi/spectrans/parser/frontend.c bc-on17/usr/src/cmd/abi/spectrans/parser/frontend.c --- on17/usr/src/cmd/abi/spectrans/parser/frontend.c Tue Jun 14 02:43:29 2005 +++ bc-on17/usr/src/cmd/abi/spectrans/parser/frontend.c Mon Jul 11 23:18:01 2005 @@ -223,7 +223,7 @@ case XLATOR_KW_FUNC: /* Function keyword */ case XLATOR_KW_DATA: /* Data keyword */ meta_info.mi_extended = 0; - retval = xlator_start_if(meta_info, ki, value); + retval = xlator_start_if(&meta_info, ki, value); switch (retval) { case XLATOR_FATAL: /* FATAL ERROR */ if (T_info->ti_verbosity >= STATUS) { @@ -255,7 +255,7 @@ break; case 1: /* Extends */ meta_info.mi_extended = 1; - extends_err = do_extends(meta_info, + extends_err = do_extends(&meta_info, T_info, value); if (extends_err) { errors += extends_err; @@ -283,7 +283,7 @@ break; case XLATOR_KW_END: /* END keyword */ if (start_if_fail == 0 && skip_if == 0) { - retval = xlator_end_if(meta_info, value); + retval = xlator_end_if(&meta_info, value); if (retval) ++errors; } @@ -296,7 +296,7 @@ break; default: if (skip_if == 0 && start_if_fail == 0) { - retval = xlator_take_kvpair(meta_info, + retval = xlator_take_kvpair(&meta_info, ki, value); if (retval) { if (T_info->ti_verbosity >= STATUS) diff -ur on17/usr/src/cmd/abi/spectrans/parser/parser.h bc-on17/usr/src/cmd/abi/spectrans/parser/parser.h --- on17/usr/src/cmd/abi/spectrans/parser/parser.h Tue Jun 14 02:43:29 2005 +++ bc-on17/usr/src/cmd/abi/spectrans/parser/parser.h Mon Jul 11 23:22:53 2005 @@ -105,7 +105,7 @@ extern int verbosity; extern int frontend(const Translator_info *); -extern int do_extends(const Meta_info, const Translator_info *, char *); +extern int do_extends(const Meta_info *, const Translator_info *, char *); extern void split(const char *, char *, char *); extern void remcomment(char const *); extern void getlinecont(char *, char *, int, FILE *, Meta_info *); @@ -121,10 +121,10 @@ extern xlator_keyword_t *xlator_init(const Translator_info *); extern int xlator_startlib(char const *libname); extern int xlator_startfile(char const *filename); -extern int xlator_start_if(const Meta_info meta_info, const int token, +extern int xlator_start_if(const Meta_info *meta_info, const int token, char *value); -extern int xlator_take_kvpair(const Meta_info, const int token, char *value); -extern int xlator_end_if(const Meta_info, const char *value); +extern int xlator_take_kvpair(Meta_info *, const int token, char *value); +extern int xlator_end_if(const Meta_info *, const char *value); extern int xlator_endfile(void); extern int xlator_endlib(void); extern int xlator_end(void); diff -ur on17/usr/src/cmd/abi/spectrans/spec2map/xlator.c bc-on17/usr/src/cmd/abi/spectrans/spec2map/xlator.c --- on17/usr/src/cmd/abi/spectrans/spec2map/xlator.c Tue Jun 14 02:43:29 2005 +++ bc-on17/usr/src/cmd/abi/spectrans/spec2map/xlator.c Mon Jul 11 23:22:46 2005 @@ -197,7 +197,7 @@ * XLATOR_FATAL on fatal error */ int -xlator_start_if(const Meta_info meta_info, const int token, char *value) +xlator_start_if(const Meta_info *meta_info, const int token, char *value) { char rhs[BUFSIZ]; char *kw; @@ -220,8 +220,8 @@ return (XLATOR_FATAL); } - Curline = meta_info.mi_line_number; - seterrline(Curline, meta_info.mi_filename, kw, value); + Curline = meta_info->mi_line_number; + seterrline(Curline, meta_info->mi_filename, kw, value); if (Curfun != NULL) { errlog(INPUT|ERROR, @@ -268,7 +268,7 @@ * XLATOR_NONFATAL on error */ int -xlator_take_kvpair(const Meta_info meta_info, const int token, +xlator_take_kvpair(Meta_info *meta_info, const int token, char *value) { char *p; @@ -275,12 +275,12 @@ char *subv = NULL; char *key = Keywords[token-FIRST_TOKEN].key; - Curline = meta_info.mi_line_number; - seterrline(Curline, meta_info.mi_filename, key, value); + Curline = meta_info->mi_line_number; + seterrline(Curline, meta_info->mi_filename, key, value); errlog(TRACING, "take_kvpair called. ext_cnt=%d token=%d key=%s value=%s", - meta_info.mi_ext_cnt, token, key, value); + meta_info->mi_ext_cnt, token, key, value); if (Curfun == NULL) { errlog(INPUT|ERROR, "Error: Keyword found outside " @@ -290,7 +290,7 @@ switch (token) { case XLATOR_KW_VERSION: - if (meta_info.mi_ext_cnt != 0) + if (meta_info->mi_ext_cnt != 0) return (XLATOR_SUCCESS); errlog(TRACING, "Version found. Setting Version to %s", value); @@ -342,7 +342,7 @@ break; case XLATOR_KW_ARCH: - if (meta_info.mi_ext_cnt != 0) + if (meta_info->mi_ext_cnt != 0) return (XLATOR_SUCCESS); if (value[0] != '\0') { @@ -370,7 +370,7 @@ /* * Note that we allow extends for the binding keyword by - * not checking that meta_info.mi_ext_cnt == 0 here. + * not checking that meta_info->mi_ext_cnt == 0 here. */ /* remove trailing white space */ @@ -410,7 +410,7 @@ * chain to get the filter or auxiliary values: we want * the first/most-tightly-bound one (mi_ext_cnt = 0). */ - if (meta_info.mi_ext_cnt != 0) + if (meta_info->mi_ext_cnt != 0) return (XLATOR_SUCCESS); errlog(TRACING, "Filter[token=%d] found. Setting Filter to %s", @@ -451,12 +451,12 @@ */ /*ARGSUSED*/ int -xlator_end_if(const Meta_info M, const char *value) +xlator_end_if(const Meta_info *M, const char *value) { int retval = XLATOR_NONFATAL; int picky = Flags & XLATOR_PICKY_FLAG; - seterrline(M.mi_line_number, M.mi_filename, "End", ""); + seterrline(M->mi_line_number, M->mi_filename, "End", ""); errlog(TRACING, "xlator_end_if"); if (Curfun == NULL) { diff -ur on17/usr/src/cmd/abi/spectrans/spec2trace/trace.c bc-on17/usr/src/cmd/abi/spectrans/spec2trace/trace.c --- on17/usr/src/cmd/abi/spectrans/spec2trace/trace.c Tue Jun 14 02:43:30 2005 +++ bc-on17/usr/src/cmd/abi/spectrans/spec2trace/trace.c Mon Jul 11 23:19:41 2005 @@ -97,7 +97,7 @@ end; } Statistics; -#define LINE (m.mi_line_number-(m.mi_nlines-1)) +#define LINE (m->mi_line_number-(m->mi_nlines-1)) static void stats_init(void); static void stats_report(void); @@ -211,7 +211,7 @@ * interface in the spec file. */ int -xlator_start_if(const Meta_info m, int const token, char *value) +xlator_start_if(const Meta_info *m, int const token, char *value) { char ifname[BUFSIZ]; char *kw; @@ -231,7 +231,7 @@ return (XLATOR_FATAL); } - seterrline(LINE, m.mi_filename, kw, value); + seterrline(LINE, m->mi_filename, kw, value); errlog(BEGIN, "xlator_start_if() {"); /* @@ -256,7 +256,7 @@ errlog(TRACING, "now in interface \"%s\"", value); - symtab_new_function(m.mi_line_number, m.mi_filename); + symtab_new_function(m->mi_line_number, m->mi_filename); /* Also cleans junk out of symbol table. */ errlog(END, "}"); return (SUCCESS_RC); @@ -267,17 +267,17 @@ * front-end wrapper. */ int -xlator_take_kvpair(Meta_info m, int const token, char *value) +xlator_take_kvpair(Meta_info *m, int const token, char *value) { int retval; char *key = Keywords[token-FIRST_TOKEN].key; int line = LINE; /* TBD */ - symtab_set_filename(m.mi_filename); + symtab_set_filename(m->mi_filename); value = strnormalize(value); - seterrline(line, m.mi_filename, key, value); + seterrline(line, m->mi_filename, key, value); errlog(BEGIN, "xlator_take_kvpair() {"); Statistics.lines++; errlog(VERBOSE, "key='%s', value='%s'", @@ -292,7 +292,7 @@ */ symtab_clear_function(); /* Always use last one. */ errlog(END, "}"); - retval = collect_prototype(value, line, m.mi_ext_cnt); + retval = collect_prototype(value, line, m->mi_ext_cnt); break; case XLATOR_KW_INCL: @@ -323,12 +323,12 @@ break; case XLATOR_KW_WEAK: - if (m.mi_extended == 1) { + if (m->mi_extended == 1) { errlog(ERROR, "\"%s\", line %d: " "Warning: Cannot use extends with a weak " "interface", - m.mi_filename, - m.mi_line_number); + m->mi_filename, + m->mi_line_number); } retval = SUCCESS_RC; break; @@ -347,9 +347,9 @@ */ /*ARGSUSED*/ int -xlator_end_if(const Meta_info m, char const *value) +xlator_end_if(const Meta_info *m, char const *value) { - seterrline(LINE, m.mi_filename, "end", value); + seterrline(LINE, m->mi_filename, "end", value); errlog(BEGIN, "xlator_end_if() {"); if (symtab_get_skip() == YES) { symtab_set_skip(NO);