diff options
Diffstat (limited to 'src/tet3')
225 files changed, 85 insertions, 1043 deletions
diff --git a/src/tet3/apilib/dcancel.c b/src/tet3/apilib/dcancel.c index cff68645..0fdbe4af 100644 --- a/src/tet3/apilib/dcancel.c +++ b/src/tet3/apilib/dcancel.c @@ -54,12 +54,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tet_api.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** deletion reason structure ** diff --git a/src/tet3/apilib/dconfig.c b/src/tet3/apilib/dconfig.c index af499c19..832ee2bb 100644 --- a/src/tet3/apilib/dconfig.c +++ b/src/tet3/apilib/dconfig.c @@ -102,12 +102,6 @@ MODIFICATIONS: #include "tet_api.h" #include "apilib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* the configuration variable list */ static char **varptrs; static int lvarptrs, nvarptrs; diff --git a/src/tet3/apilib/dresfile.c b/src/tet3/apilib/dresfile.c index ba0a1860..8cf9451c 100644 --- a/src/tet3/apilib/dresfile.c +++ b/src/tet3/apilib/dresfile.c @@ -189,10 +189,6 @@ MODIFICATIONS: #include "tet_jrnl.h" #include "apilib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - #define MODE666 (mode_t) \ (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) diff --git a/src/tet3/apilib/errno.c b/src/tet3/apilib/errno.c index 8833c391..6b679db6 100644 --- a/src/tet3/apilib/errno.c +++ b/src/tet3/apilib/errno.c @@ -72,10 +72,6 @@ MODIFICATIONS: #include "error.h" #include "dtthr.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - #ifndef TET_THREADS TET_IMPORT int tet_errno; #else /* !TET_THREADS */ diff --git a/src/tet3/apilib/exit.c b/src/tet3/apilib/exit.c index 52e60ccb..b9d8fdc2 100644 --- a/src/tet3/apilib/exit.c +++ b/src/tet3/apilib/exit.c @@ -91,12 +91,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "sigsafe.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tet_exit() - log off all servers and exit */ diff --git a/src/tet3/apilib/getlist.c b/src/tet3/apilib/getlist.c index f57a9678..facdf4c6 100644 --- a/src/tet3/apilib/getlist.c +++ b/src/tet3/apilib/getlist.c @@ -83,11 +83,6 @@ MODIFICATIONS: #ifndef TET_LITE /* -START-LITE-CUT- */ -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - TET_IMPORT int tet_remgetlist(sysnames) int **sysnames; { diff --git a/src/tet3/apilib/getsys.c b/src/tet3/apilib/getsys.c index a2ac3af4..b89b9208 100644 --- a/src/tet3/apilib/getsys.c +++ b/src/tet3/apilib/getsys.c @@ -57,12 +57,6 @@ MODIFICATIONS: #include "globals.h" #include "tet_api.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - TET_IMPORT int tet_remgetsys() { #ifndef TET_LITE /* -START-LITE-CUT- */ diff --git a/src/tet3/apilib/getsysid.c b/src/tet3/apilib/getsysid.c index 0fe28caa..35b16fca 100644 --- a/src/tet3/apilib/getsysid.c +++ b/src/tet3/apilib/getsysid.c @@ -62,11 +62,6 @@ MODIFICATIONS: #include "sysent.h" #include "tet_api.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - TET_IMPORT int tet_getsysbyid(sysid, sysp) int sysid; struct tet_sysent *sysp; diff --git a/src/tet3/apilib/remexec.c b/src/tet3/apilib/remexec.c index e08b516b..7cdd38cd 100644 --- a/src/tet3/apilib/remexec.c +++ b/src/tet3/apilib/remexec.c @@ -106,10 +106,6 @@ MODIFICATIONS: #include "sigsafe.h" #include "bitset.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* the maximum number of systems (0 -> 999) */ #define NUMSYS 1000 diff --git a/src/tet3/apilib/remkill.c b/src/tet3/apilib/remkill.c index f88269ba..f929230d 100644 --- a/src/tet3/apilib/remkill.c +++ b/src/tet3/apilib/remkill.c @@ -61,11 +61,6 @@ MODIFICATIONS: #include "valmsg.h" #include "servlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - int tet_remkill(remoteid) int remoteid; { diff --git a/src/tet3/apilib/remtime.c b/src/tet3/apilib/remtime.c index cf65279c..490bc70a 100644 --- a/src/tet3/apilib/remtime.c +++ b/src/tet3/apilib/remtime.c @@ -63,10 +63,6 @@ MODIFICATIONS: #include "sysent.h" #include "servlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - TET_IMPORT int tet_remtime(sysid, tp) int sysid; time_t *tp; diff --git a/src/tet3/apilib/remwait.c b/src/tet3/apilib/remwait.c index ec7e9042..c4e77e4e 100644 --- a/src/tet3/apilib/remwait.c +++ b/src/tet3/apilib/remwait.c @@ -67,11 +67,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - int tet_remwait(remoteid, waittime, statloc) int remoteid, waittime, *statloc; { diff --git a/src/tet3/apilib/rtab.c b/src/tet3/apilib/rtab.c index 97c44cc1..245631c2 100644 --- a/src/tet3/apilib/rtab.c +++ b/src/tet3/apilib/rtab.c @@ -50,13 +50,8 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct rtab *rtab; /* ptr to head of remote execution table */ - /* ** tet_rtalloc() - allocate a remote execution table element and return ** a pointer thereto diff --git a/src/tet3/apilib/sync.c b/src/tet3/apilib/sync.c index f70bfb57..c7ff97aa 100644 --- a/src/tet3/apilib/sync.c +++ b/src/tet3/apilib/sync.c @@ -106,10 +106,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #define REPORT_YES 1 #define REPORT_NO 0 diff --git a/src/tet3/apilib/tet_exec.c b/src/tet3/apilib/tet_exec.c index fb4132a3..7a11bc00 100644 --- a/src/tet3/apilib/tet_exec.c +++ b/src/tet3/apilib/tet_exec.c @@ -127,12 +127,6 @@ MODIFICATIONS: #include "dtthr.h" #include "ltoa.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - - extern char **ENVIRON; static struct envlist { diff --git a/src/tet3/apilib/tet_fork.c b/src/tet3/apilib/tet_fork.c index 15abd94b..ad0ac259 100644 --- a/src/tet3/apilib/tet_fork.c +++ b/src/tet3/apilib/tet_fork.c @@ -195,10 +195,6 @@ MODIFICATIONS: #define KILLWAIT 10 -# ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -# endif - # ifndef TET_THREADS static int alrm_flag; /* threads version is #defined in alarm.h */ # endif diff --git a/src/tet3/apilib/tet_spawn.c b/src/tet3/apilib/tet_spawn.c index dca3e663..2dc895af 100644 --- a/src/tet3/apilib/tet_spawn.c +++ b/src/tet3/apilib/tet_spawn.c @@ -100,10 +100,6 @@ MODIFICATIONS: #define KILLWAIT 10 -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - static pid_t childpid; #ifdef TET_THREADS static sigset_t oldset; diff --git a/src/tet3/apithr/api_lock.c b/src/tet3/apithr/api_lock.c index 72e9891e..81bf2f64 100644 --- a/src/tet3/apithr/api_lock.c +++ b/src/tet3/apithr/api_lock.c @@ -31,7 +31,7 @@ AUTHOR: Geoff Clare, UniSoft Ltd. DATE CREATED: July 1996 SYNOPSIS: - void tet_api_lock(int getlock, char *file, int line); + void tet_api_lock(int getlock, const char *file, int line); DESCRIPTION: @@ -70,17 +70,10 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - extern tet_mutex_t tet_top_mtx; void -tet_api_lock(getlock, file, line) -int getlock; -char *file; -int line; +tet_api_lock(int getlock, const char *file, int line) { sigset_t tmpset; static sigset_t oset; diff --git a/src/tet3/apithr/thr_create.c b/src/tet3/apithr/thr_create.c index b6d2e465..07e43597 100644 --- a/src/tet3/apithr/thr_create.c +++ b/src/tet3/apithr/thr_create.c @@ -143,10 +143,6 @@ MODIFICATIONS: # include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - #define KILLWAIT 5 /* seconds to wait for child to exit */ #define THRKILLWAIT 12 /* secs to wait for thread after forcing it to exit (should be > 2*KILLWAIT) */ diff --git a/src/tet3/apithr/thr_create.c.orig b/src/tet3/apithr/thr_create.c.orig index d1aadc58..5087d7a2 100644 --- a/src/tet3/apithr/thr_create.c.orig +++ b/src/tet3/apithr/thr_create.c.orig @@ -111,10 +111,6 @@ MODIFICATIONS: # include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - #define KILLWAIT 5 /* seconds to wait for child to exit */ #define THRKILLWAIT 12 /* secs to wait for thread after forcing it to exit (should be > 2*KILLWAIT) */ diff --git a/src/tet3/dtet2lib/addarg.c b/src/tet3/dtet2lib/addarg.c index 21d8ea54..9b77c3ca 100644 --- a/src/tet3/dtet2lib/addarg.c +++ b/src/tet3/dtet2lib/addarg.c @@ -34,11 +34,6 @@ MODIFICATIONS: #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tet_addargv() - concatenate two argv argument lists and return ** a pointer to the results diff --git a/src/tet3/dtet2lib/alarm.c b/src/tet3/dtet2lib/alarm.c index 49fe4e9a..f9bb7085 100644 --- a/src/tet3/dtet2lib/alarm.c +++ b/src/tet3/dtet2lib/alarm.c @@ -97,10 +97,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - #ifdef TET_THREADS #define ALRMWAIT 5 /* seconds to wait for tet_clr_alarm() to diff --git a/src/tet3/dtet2lib/avmsg.c b/src/tet3/dtet2lib/avmsg.c index 62e51906..bfb9e304 100644 --- a/src/tet3/dtet2lib/avmsg.c +++ b/src/tet3/dtet2lib/avmsg.c @@ -50,10 +50,6 @@ MODIFICATIONS: #include "avmsg.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct stdesc st[] = { AVMSG_DESC }; diff --git a/src/tet3/dtet2lib/basename.c b/src/tet3/dtet2lib/basename.c index 9441203b..12b608cf 100644 --- a/src/tet3/dtet2lib/basename.c +++ b/src/tet3/dtet2lib/basename.c @@ -53,11 +53,10 @@ MODIFICATIONS: ** directory separator character */ -TET_IMPORT char *tet_basename(path) -char *path; +TET_IMPORT const char *tet_basename(const char *path) { - register char *p; - register char *retval = path; + register const char *p; + register const char *retval = path; if (path) for (p = path; *p; p++) @@ -66,4 +65,3 @@ char *path; return(retval); } - diff --git a/src/tet3/dtet2lib/btmsg.c b/src/tet3/dtet2lib/btmsg.c index ac8cf798..72a9c4d8 100644 --- a/src/tet3/dtet2lib/btmsg.c +++ b/src/tet3/dtet2lib/btmsg.c @@ -46,10 +46,6 @@ MODIFICATIONS: #include "btmsg.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct stdesc st[] = { BTMSG_DESC }; diff --git a/src/tet3/dtet2lib/bufchk.c b/src/tet3/dtet2lib/bufchk.c index d1e4963f..2218579a 100644 --- a/src/tet3/dtet2lib/bufchk.c +++ b/src/tet3/dtet2lib/bufchk.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_bufchk() - check that there is enough space in a data buffer diff --git a/src/tet3/dtet2lib/buftrace.c b/src/tet3/dtet2lib/buftrace.c index 5d052ee2..64598ba6 100644 --- a/src/tet3/dtet2lib/buftrace.c +++ b/src/tet3/dtet2lib/buftrace.c @@ -46,19 +46,13 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_buftrace() - call tet_bufchk, emit trace information ** ** return 0 if successful or -1 on error */ -TET_IMPORT int tet_buftrace(bpp, lp, newlen, file, line) -char **bpp, *file; -int *lp, newlen, line; +TET_IMPORT int tet_buftrace(char **bpp, int *lp, int newlen, const char *file, int line) { register int rc; diff --git a/src/tet3/dtet2lib/dtsize.c b/src/tet3/dtet2lib/dtsize.c index da44a055..137f2ba2 100644 --- a/src/tet3/dtet2lib/dtsize.c +++ b/src/tet3/dtet2lib/dtsize.c @@ -59,10 +59,6 @@ MODIFICATIONS: #endif /* !_WIN32 && !HAS_GETDTABLESIZE */ #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_getdtablesize() - return size of file descriptor table */ diff --git a/src/tet3/dtet2lib/eaccess.c b/src/tet3/dtet2lib/eaccess.c index 2f106191..f2b80df7 100644 --- a/src/tet3/dtet2lib/eaccess.c +++ b/src/tet3/dtet2lib/eaccess.c @@ -55,11 +55,6 @@ MODIFICATIONS: #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* static function declarations */ static int check_grouplist PROTOLIST((struct STAT_ST *, int)); diff --git a/src/tet3/dtet2lib/fappend.c b/src/tet3/dtet2lib/fappend.c index 6f6a2a32..beb21aeb 100644 --- a/src/tet3/dtet2lib/fappend.c +++ b/src/tet3/dtet2lib/fappend.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_fappend() - set append mode on a file ** diff --git a/src/tet3/dtet2lib/fcopy.c b/src/tet3/dtet2lib/fcopy.c index 3969db5d..f232e164 100644 --- a/src/tet3/dtet2lib/fcopy.c +++ b/src/tet3/dtet2lib/fcopy.c @@ -82,11 +82,6 @@ MODIFICATIONS: # endif /* -END-LITE-CUT- */ #endif - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* mask used to extract the permissions bits from st_mode */ #define MODEMASK (S_IRWXU | S_IRWXG | S_IRWXO) diff --git a/src/tet3/dtet2lib/fioclex.c b/src/tet3/dtet2lib/fioclex.c index af335078..3543289d 100644 --- a/src/tet3/dtet2lib/fioclex.c +++ b/src/tet3/dtet2lib/fioclex.c @@ -50,10 +50,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_fioclex() - set the close-on-exec bit on a file descriptor ** diff --git a/src/tet3/dtet2lib/ftoa.c b/src/tet3/dtet2lib/ftoa.c index ebb3b110..42527c92 100644 --- a/src/tet3/dtet2lib/ftoa.c +++ b/src/tet3/dtet2lib/ftoa.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "ftoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_f2a() - return printable representation of ptab pt_flags value ** diff --git a/src/tet3/dtet2lib/genfatal.c b/src/tet3/dtet2lib/genfatal.c index f51a2df9..e2b46fa1 100644 --- a/src/tet3/dtet2lib/genfatal.c +++ b/src/tet3/dtet2lib/genfatal.c @@ -52,9 +52,7 @@ MODIFICATIONS: ** tet_genfatal() - generic fatal error handler */ -TET_IMPORT void tet_genfatal(errnum, file, line, s1, s2) -int errnum, line; -char *file, *s1, *s2; +TET_IMPORT void tet_genfatal(int errnum, const char *file, int line, const char *s1, const char *s2) { (*tet_liberror)(errnum, file, line, s1, s2); @@ -64,4 +62,3 @@ char *file, *s1, *s2; exit(1); } - diff --git a/src/tet3/dtet2lib/globals.c b/src/tet3/dtet2lib/globals.c index ec3e2f36..0484a944 100644 --- a/src/tet3/dtet2lib/globals.c +++ b/src/tet3/dtet2lib/globals.c @@ -51,25 +51,21 @@ MODIFICATIONS: #include "error.h" #include "globals.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* global data items */ -TET_IMPORT char *tet_progname = "<unknown>"; +TET_IMPORT const char *tet_progname = "<unknown>"; /* my program name */ TET_IMPORT int tet_mypid = -1; /* my program ID */ TET_IMPORT int tet_myptype = PT_NOPROC; /* my process type */ TET_IMPORT int tet_mysysid = -1; /* my system ID */ TET_IMPORT char tet_root[MAXPATH]; /* TET_ROOT from the environment */ -TET_IMPORT void (*tet_liberror) PROTOLIST((int, char *, int, char *, char *)); +TET_IMPORT void (*tet_liberror) PROTOLIST((int, const char *, int, const char *, const char *)); /* ptr to error handler function */ -TET_IMPORT void (*tet_libfatal) PROTOLIST((int, char *, int, char *, char *)); +TET_IMPORT void (*tet_libfatal) PROTOLIST((int, const char *, int, const char *, const char *)); /* ptr to fatal error handler */ /* static function declarations */ -static void minfatal PROTOLIST((int, char *, int, char *, char *)); +static void minfatal PROTOLIST((int, const char *, int, const char *, const char *)); /* @@ -86,11 +82,9 @@ static void minfatal PROTOLIST((int, char *, int, char *, char *)); ** they have to fill in the information by hand later on */ -TET_IMPORT void tet_init_globals(progname, ptype, sysid, liberror, libfatal) -char *progname; -int ptype, sysid; -void (*liberror) PROTOLIST((int, char *, int, char *, char *)); -void (*libfatal) PROTOLIST((int, char *, int, char *, char *)); +TET_IMPORT void tet_init_globals(const char *progname, int ptype, int sysid, + void (*liberror) PROTOLIST((int, const char *, int, const char *, const char *)), + void (*libfatal) PROTOLIST((int, const char *, int, const char *, const char *))) { char *p; @@ -122,9 +116,7 @@ void (*libfatal) PROTOLIST((int, char *, int, char *, char *)); ** sufficient for use by the ASSERT() macro calls above */ -static void minfatal(err, file, line, s1, s2) -int err, line; -char *file, *s1, *s2; +static void minfatal(int err, const char *file, int line, const char *s1, const char *s2) { if (tet_liberror) (*tet_liberror)(err, file, line, s1, s2); @@ -133,4 +125,3 @@ char *file, *s1, *s2; tet_progname, file, line, s1, s2 ? s2 : ""); exit(1); } - diff --git a/src/tet3/dtet2lib/ldst.c b/src/tet3/dtet2lib/ldst.c index 768370a5..17d093f3 100644 --- a/src/tet3/dtet2lib/ldst.c +++ b/src/tet3/dtet2lib/ldst.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int bs2char PROTOLIST((char *, char *, int)); diff --git a/src/tet3/dtet2lib/llist.c b/src/tet3/dtet2lib/llist.c index 125dfe43..7ab1be88 100644 --- a/src/tet3/dtet2lib/llist.c +++ b/src/tet3/dtet2lib/llist.c @@ -39,10 +39,6 @@ MODIFICATIONS: #include "llist.h" #include "error.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_listinsert() - insert new element at the head of a linked list */ diff --git a/src/tet3/dtet2lib/madir.c b/src/tet3/dtet2lib/madir.c index c7cd1498..ef33b040 100644 --- a/src/tet3/dtet2lib/madir.c +++ b/src/tet3/dtet2lib/madir.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* mode for created directories */ #define MODEANY ((mode_t) (S_IRWXU | S_IRWXG | S_IRWXO)) diff --git a/src/tet3/dtet2lib/maperr.c b/src/tet3/dtet2lib/maperr.c index c98b6071..fc29338e 100644 --- a/src/tet3/dtet2lib/maperr.c +++ b/src/tet3/dtet2lib/maperr.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "errmap.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_maperrno() - map errno value to DTET message reply code diff --git a/src/tet3/dtet2lib/mapsig.c b/src/tet3/dtet2lib/mapsig.c index dc9887a5..8dd7ce31 100644 --- a/src/tet3/dtet2lib/mapsig.c +++ b/src/tet3/dtet2lib/mapsig.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_mapsignal() - map local signal number to DTET signal number ** diff --git a/src/tet3/dtet2lib/mkdir.c b/src/tet3/dtet2lib/mkdir.c index 2774ec01..6bc31e07 100644 --- a/src/tet3/dtet2lib/mkdir.c +++ b/src/tet3/dtet2lib/mkdir.c @@ -49,9 +49,6 @@ MODIFICATIONS: #ifdef NOMKDIR # include "error.h" -# ifdef NEEDsrcFile - static char srcFile[] = __FILE__; /* file name for error reporting */ -# endif /* NEEDsrcFile */ #else # include <unistd.h> # define MKDIR(A, B) mkdir((A), (mode_t) (B)) diff --git a/src/tet3/dtet2lib/notty.c b/src/tet3/dtet2lib/notty.c index 174bfb50..db6f9c40 100644 --- a/src/tet3/dtet2lib/notty.c +++ b/src/tet3/dtet2lib/notty.c @@ -57,11 +57,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tiocnotty() - dissociate from control terminal ** and start a new process group diff --git a/src/tet3/dtet2lib/prerror.c b/src/tet3/dtet2lib/prerror.c index e133490e..f063e6ac 100644 --- a/src/tet3/dtet2lib/prerror.c +++ b/src/tet3/dtet2lib/prerror.c @@ -57,12 +57,10 @@ MODIFICATIONS: ** tet_prerror() - format and print an error message */ -void tet_prerror(fp, errnum, hdr, file, line, s1, s2) -FILE *fp; -int errnum, line; -char *hdr, *file, *s1, *s2; +void tet_prerror(FILE *fp, int errnum, const char *hdr, const char *file, + int line, const char *s1, const char *s2) { - char *s3, *s4; + const char *s3, *s4; (void) fprintf(fp, "%s (%s, %d): %s", hdr, tet_basename(file), line, s1); @@ -70,8 +68,6 @@ char *hdr, *file, *s1, *s2; (void) fprintf(fp, " %s", s2); if (errnum > 0) { s3 = ":"; -#ifndef TET_LITE /* -START-LITE-CUT- */ -#endif /* !TET_LITE */ /* -END-LITE-CUT- */ if ((s4 = strerror(errnum)) == (char *) 0) { s3 = ", errno ="; s4 = tet_errname(errnum); @@ -83,4 +79,3 @@ char *hdr, *file, *s1, *s2; errno = 0; } - diff --git a/src/tet3/dtet2lib/ptspid.c b/src/tet3/dtet2lib/ptspid.c index 0b580340..34709296 100644 --- a/src/tet3/dtet2lib/ptspid.c +++ b/src/tet3/dtet2lib/ptspid.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "ptab.h" #include "error.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_getptbysyspid() - find a ptab element by sysid/pid ** and return a pointer thereto diff --git a/src/tet3/dtet2lib/ptstype.c b/src/tet3/dtet2lib/ptstype.c index 2b810afd..b03acc9e 100644 --- a/src/tet3/dtet2lib/ptstype.c +++ b/src/tet3/dtet2lib/ptstype.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "ptab.h" #include "error.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_getptbysysptype() - find a ptab element by sysid/ptype ** and return a pointer thereto diff --git a/src/tet3/dtet2lib/pttype.c b/src/tet3/dtet2lib/pttype.c index aa3e9ef3..149aa8eb 100644 --- a/src/tet3/dtet2lib/pttype.c +++ b/src/tet3/dtet2lib/pttype.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "ptab.h" #include "error.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_getnextptbyptype() - find a ptab element by ptype ** and return a pointer thereto diff --git a/src/tet3/dtet2lib/putenv.c b/src/tet3/dtet2lib/putenv.c index e9fe6a8b..43542daa 100644 --- a/src/tet3/dtet2lib/putenv.c +++ b/src/tet3/dtet2lib/putenv.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "dtmac.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_putenv() - add an environment string to the environment ** diff --git a/src/tet3/dtet2lib/rescode.c b/src/tet3/dtet2lib/rescode.c index b3b9b1d0..b689799f 100644 --- a/src/tet3/dtet2lib/rescode.c +++ b/src/tet3/dtet2lib/rescode.c @@ -69,10 +69,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* default result code table */ static struct restab restab_dflt[] = { diff --git a/src/tet3/dtet2lib/sigsafe.c b/src/tet3/dtet2lib/sigsafe.c index a76329fd..a72fbaa3 100644 --- a/src/tet3/dtet2lib/sigsafe.c +++ b/src/tet3/dtet2lib/sigsafe.c @@ -56,10 +56,6 @@ MODIFICATIONS: #include "error.h" #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static int init_done = 0; diff --git a/src/tet3/dtet2lib/strstore.c b/src/tet3/dtet2lib/strstore.c index 8fe651fe..db7f5cbe 100644 --- a/src/tet3/dtet2lib/strstore.c +++ b/src/tet3/dtet2lib/strstore.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef NOTRACE #include "ltoa.h" #endif diff --git a/src/tet3/dtet2lib/sysent.c b/src/tet3/dtet2lib/sysent.c index 1f104506..b05e4bdc 100644 --- a/src/tet3/dtet2lib/sysent.c +++ b/src/tet3/dtet2lib/sysent.c @@ -56,10 +56,6 @@ MODIFICATIONS: #include "globals.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static FILE *sfp = NULL; /* systems file stream pointer */ /* diff --git a/src/tet3/dtet2lib/targs.c b/src/tet3/dtet2lib/targs.c index 4e6e4349..26828ef4 100644 --- a/src/tet3/dtet2lib/targs.c +++ b/src/tet3/dtet2lib/targs.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* global variables in trace.c */ extern struct tflags tet_tflags[]; extern int tet_Ntflags; diff --git a/src/tet3/dtet2lib/tfname.c b/src/tet3/dtet2lib/tfname.c index a7427917..f3bf5620 100644 --- a/src/tet3/dtet2lib/tfname.c +++ b/src/tet3/dtet2lib/tfname.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "bstring.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char *dirs[] = { (char *) 0, "/usr/tmp", "/tmp", (char *) 0 }; static char **tmpdirs; diff --git a/src/tet3/dtet2lib/trace.c b/src/tet3/dtet2lib/trace.c index ba8579c8..c13c471a 100644 --- a/src/tet3/dtet2lib/trace.c +++ b/src/tet3/dtet2lib/trace.c @@ -70,10 +70,6 @@ MODIFICATIONS: #include "ltoa.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - FILE *tet_tfp = NULL; /* trace file pointer */ /* the trace flags themselves */ @@ -329,8 +325,8 @@ void tet_tftrace() ** tet_trace() - print trace info to a file, opening it if necessary */ -TET_IMPORT void tet_trace(s1, s2, s3, s4, s5, s6) -char *s1, *s2, *s3, *s4, *s5, *s6; +TET_IMPORT void tet_trace(const char *s1, const char *s2, const char *s3, + const char *s4, const char *s5, const char *s6) { register int save_errno; time_t now; diff --git a/src/tet3/dtet2lib/unmaperr.c b/src/tet3/dtet2lib/unmaperr.c index 6afe03cf..15e28d07 100644 --- a/src/tet3/dtet2lib/unmaperr.c +++ b/src/tet3/dtet2lib/unmaperr.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "errmap.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_unmaperrno() - map DTET message reply code values to local errno diff --git a/src/tet3/dtet2lib/unmapsig.c b/src/tet3/dtet2lib/unmapsig.c index e1f22ed3..44ba1e62 100644 --- a/src/tet3/dtet2lib/unmapsig.c +++ b/src/tet3/dtet2lib/unmapsig.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "sigmap.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_unmapsignal() - map DTET signal number to local signal number ** diff --git a/src/tet3/dtet2lib/valmsg.c b/src/tet3/dtet2lib/valmsg.c index 010c4c04..db05ad01 100644 --- a/src/tet3/dtet2lib/valmsg.c +++ b/src/tet3/dtet2lib/valmsg.c @@ -51,10 +51,6 @@ MODIFICATIONS: #include "valmsg.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct stdesc st[] = { VALMSG_DESC }; diff --git a/src/tet3/inc/dtetlib.h b/src/tet3/inc/dtetlib.h index 9ab3b817..bbf94564 100644 --- a/src/tet3/inc/dtetlib.h +++ b/src/tet3/inc/dtetlib.h @@ -59,10 +59,10 @@ extern char **tet_addargv PROTOLIST((char **, char **)); extern int tet_addresult PROTOLIST((int, int)); extern int tet_resulttostatus PROTOLIST((int)); extern int tet_addstatus PROTOLIST((int, int)); -TET_IMPORT_FUNC(char *, tet_basename, PROTOLIST((char *))); +TET_IMPORT_FUNC(const char *, tet_basename, PROTOLIST((const char *))); TET_IMPORT_FUNC(int, tet_bufchk, PROTOLIST((char **, int *, int))); TET_IMPORT_FUNC(int, tet_buftrace, - PROTOLIST((char **, int *, int, char *, int))); + PROTOLIST((char **, int *, int, const char *, int))); extern int tet_eaccess PROTOLIST((char *, int)); extern char *tet_equindex PROTOLIST((char *)); extern char *tet_errname PROTOLIST((int)); @@ -72,7 +72,7 @@ extern int tet_fgetargs PROTOLIST((FILE *, char **, int)); extern int tet_fioclex PROTOLIST((int)); extern void tet_generror PROTOLIST((int, char *, int, char *, char *)); TET_IMPORT_FUNC(void, tet_genfatal, - PROTOLIST((int, char *, int, char *, char *))); + PROTOLIST((int, const char *, int, const char *, const char *))); TET_IMPORT_FUNC(int, tet_getargs, PROTOLIST((char *, char **, int))); extern int tet_getdtablesize PROTOLIST((void)); extern int tet_getrescode PROTOLIST((char *, int *)); @@ -86,8 +86,8 @@ extern int tet_mkalldirs PROTOLIST((char *)); extern int tet_mkdir PROTOLIST((char *, int)); extern int tet_mkoptarg PROTOLIST((char *, int, char *, int)); extern char *tet_mktfname PROTOLIST((char *)); -extern void tet_prerror PROTOLIST((FILE *, int, char *, char *, int, char *, - char *)); +extern void tet_prerror PROTOLIST((FILE *, int, const char *, const char *, int, + const char *, const char *)); extern char *tet_ptflags PROTOLIST((int)); TET_IMPORT_FUNC(char *, tet_ptptype, PROTOLIST((int))); TET_IMPORT_FUNC(char *, tet_ptrepcode, PROTOLIST((int))); diff --git a/src/tet3/inc/dtmac.h b/src/tet3/inc/dtmac.h index d25deb23..2297bb52 100644 --- a/src/tet3/inc/dtmac.h +++ b/src/tet3/inc/dtmac.h @@ -396,12 +396,7 @@ MODIFICATIONS: if ((flag) >= (level)) tet_tdump(from, count, title); else # define BUFCHK(bpp, lp, newlen) \ - tet_buftrace(bpp, lp, newlen, srcFile, __LINE__) - -# ifndef NEEDsrcFile -# define NEEDsrcFile -# endif - + tet_buftrace(bpp, lp, newlen, __FILE__, __LINE__) /* ** declarations of extern functions and data items @@ -420,7 +415,8 @@ MODIFICATIONS: extern void tet_tdump PROTOLIST((char *, int, char *)); TET_IMPORT_FUNC(void, tet_tfclear, PROTOLIST((void))); TET_IMPORT_FUNC(void, tet_trace, - PROTOLIST((char *, char *, char *, char *, char *, char *))); + PROTOLIST((const char *, const char *, const char *, const char *, + const char *, const char *))); extern char **tet_traceargs PROTOLIST((int, char **)); TET_IMPORT_FUNC(void, tet_traceinit, PROTOLIST((int, char **))); diff --git a/src/tet3/inc/dtthr.h b/src/tet3/inc/dtthr.h index 4dabe396..5f57f2fe 100644 --- a/src/tet3/inc/dtthr.h +++ b/src/tet3/inc/dtthr.h @@ -238,13 +238,9 @@ MODIFICATIONS: /* top-level API mutex with calls that can be nested */ -# define API_LOCK tet_api_lock(1, srcFile, __LINE__) -# define API_UNLOCK tet_api_lock(0, srcFile, __LINE__) - extern void tet_api_lock(); - -# ifndef NEEDsrcFile -# define NEEDsrcFile -# endif +# define API_LOCK tet_api_lock(1, __FILE__, __LINE__) +# define API_UNLOCK tet_api_lock(0, __FILE__, __LINE__) + void tet_api_lock(int getlock, const char *file, int line); #else /* TET_THREADS */ diff --git a/src/tet3/inc/error.h b/src/tet3/inc/error.h index 0bb2e1e7..75a7ace4 100644 --- a/src/tet3/inc/error.h +++ b/src/tet3/inc/error.h @@ -27,10 +27,6 @@ DESCRIPTION: error message printing macros avoids cluttering source files with long function call lines - each .c file that includes this file needs a line of the form - - static char srcFile[] = __FILE__; - the file containing main() should contain pointers called (*tet_liberror)() and (*tet_libfatal)() which should be initialised to point to the error handler and fatal error handler routines to use @@ -54,18 +50,14 @@ MODIFICATIONS: TET_IMPORT_FUNC_PTR(void, tet_liberror, - PROTOLIST((int, char *, int, char *, char *))); + PROTOLIST((int, const char *, int, const char *, const char *))); TET_IMPORT_FUNC_PTR(void, tet_libfatal, - PROTOLIST((int, char *, int, char *, char *))); + PROTOLIST((int, const char *, int, const char *, const char *))); #define error(errnum, s1, s2) \ - (*tet_liberror)(errnum, srcFile, __LINE__, s1, s2) + (*tet_liberror)(errnum, __FILE__, __LINE__, s1, s2) #define fatal(errnum, s1, s2) \ - (*tet_libfatal)(errnum, srcFile, __LINE__, s1, s2) - -#ifndef NEEDsrcFile -#define NEEDsrcFile -#endif + (*tet_libfatal)(errnum, __FILE__, __LINE__, s1, s2) /* test an assertion, exit if it fails */ TET_IMPORT_ARRAY(char, tet_assertmsg, []); diff --git a/src/tet3/inc/globals.h b/src/tet3/inc/globals.h index f44e0c2c..f5f37c33 100644 --- a/src/tet3/inc/globals.h +++ b/src/tet3/inc/globals.h @@ -43,7 +43,7 @@ MODIFICATIONS: ************************************************************************/ -TET_IMPORT_DATA(char *, tet_progname); /* my program name */ +TET_IMPORT_DATA(const char *, tet_progname); /* my program name */ TET_IMPORT_DATA(int, tet_mypid); /* my process ID */ TET_IMPORT_DATA(int, tet_myptype); /* my process type */ TET_IMPORT_DATA(int, tet_mysysid); /* my system ID */ @@ -52,8 +52,8 @@ TET_IMPORT_ARRAY(char, tet_root, [MAXPATH]); /* extern function declarations */ TET_IMPORT_FUNC(void, tet_init_globals, PROTOLIST(( - char *, int, int, - void (*) PROTOLIST((int, char *, int, char *, char *)), - void (*) PROTOLIST((int, char *, int, char *, char *)) + const char *, int, int, + void (*) PROTOLIST((int, const char *, int, const char *, const char *)), + void (*) PROTOLIST((int, const char *, int, const char *, const char *)) ))); diff --git a/src/tet3/inc/xtilib_xt.h b/src/tet3/inc/xtilib_xt.h index 890c535c..822a55ef 100644 --- a/src/tet3/inc/xtilib_xt.h +++ b/src/tet3/inc/xtilib_xt.h @@ -58,13 +58,9 @@ MODIFICATIONS: #define T_ALLOC_DIS(fd) ((struct t_discon *) t_alloc(fd, T_DIS, T_ADDR)) #define xt_error(errnum, s1, s2) \ - tet_xtierror(errnum, srcFile, __LINE__, s1, s2) + tet_xtierror(errnum, __FILE__, __LINE__, s1, s2) #define xt_fatal(errnum, s1, s2) \ - tet_xtifatal(errnum, srcFile, __LINE__, s1, s2) - -#ifndef NEEDsrcFile -# define NEEDsrcFile -#endif + tet_xtifatal(errnum, __FILE__, __LINE__, s1, s2) /* extern data items */ TET_EXPORT_DATA(char *, tet_tpname); @@ -82,6 +78,6 @@ extern int tet_ts_nbio PROTOLIST((struct ptab *)); extern void tet_ts_accept PROTOLIST((int)); extern char *tet_xterrno2a PROTOLIST((int)); extern char *tet_xtev2a PROTOLIST((int)); -extern void tet_xtierror PROTOLIST((int, char *, int, char *, char *)); -extern void tet_xtifatal PROTOLIST((int, char *, int, char *, char *)); +extern void tet_xtierror PROTOLIST((int, const char *, int, const char *, const char *)); +extern void tet_xtifatal PROTOLIST((int, const char *, int, const char *, const char *)); diff --git a/src/tet3/inetlib/accept.c b/src/tet3/inetlib/accept.c index 78aee368..ca5df012 100644 --- a/src/tet3/inetlib/accept.c +++ b/src/tet3/inetlib/accept.c @@ -50,10 +50,6 @@ MODIFICATIONS: #include "server_in.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_accept() - accept a new connection on a listening socket ** and allocate a ptab entry for it diff --git a/src/tet3/inetlib/connect.c b/src/tet3/inetlib/connect.c index 3ae26d98..1789f2c8 100644 --- a/src/tet3/inetlib/connect.c +++ b/src/tet3/inetlib/connect.c @@ -74,10 +74,6 @@ MODIFICATIONS: #include "tslib.h" #include "server_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_connect() - make a connection to a remote process */ diff --git a/src/tet3/inetlib/host.c b/src/tet3/inetlib/host.c index 9feab37a..986294cd 100644 --- a/src/tet3/inetlib/host.c +++ b/src/tet3/inetlib/host.c @@ -51,10 +51,6 @@ MODIFICATIONS: #include "ptab.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #define NHCACHE 2 /* no of host cache entries - one for localhost and one for the master system */ diff --git a/src/tet3/inetlib/listn.c b/src/tet3/inetlib/listn.c index adf39a1b..61f59d97 100644 --- a/src/tet3/inetlib/listn.c +++ b/src/tet3/inetlib/listn.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "ptab.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_listen() - arrange to listen on the incoming message socket diff --git a/src/tet3/inetlib/nbio.c b/src/tet3/inetlib/nbio.c index 12ab4c75..757a4fb3 100644 --- a/src/tet3/inetlib/nbio.c +++ b/src/tet3/inetlib/nbio.c @@ -53,11 +53,6 @@ MODIFICATIONS: #include "ltoa.h" #include "error.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_nbio() - establish non-blocking i/o on a socket ** diff --git a/src/tet3/inetlib/poll.c b/src/tet3/inetlib/poll.c index 8614a7ed..cc1a881d 100644 --- a/src/tet3/inetlib/poll.c +++ b/src/tet3/inetlib/poll.c @@ -63,10 +63,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** compatability for systems with pre-BSD4.3 select() call - diff --git a/src/tet3/inetlib/poll.c.orig b/src/tet3/inetlib/poll.c.orig index 992c3711..4055fd6d 100644 --- a/src/tet3/inetlib/poll.c.orig +++ b/src/tet3/inetlib/poll.c.orig @@ -59,10 +59,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** compatability for systems with pre-BSD4.3 select() call - diff --git a/src/tet3/inetlib/rdwr.c b/src/tet3/inetlib/rdwr.c index ddfbbdae..5a528c04 100644 --- a/src/tet3/inetlib/rdwr.c +++ b/src/tet3/inetlib/rdwr.c @@ -69,10 +69,6 @@ MODIFICATIONS: #include "tslib.h" #include "server_bs.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef NOTRACE static char msghdr[] = "message header"; static char msgdata[] = "message data"; diff --git a/src/tet3/inetlib/rdwr.c.orig b/src/tet3/inetlib/rdwr.c.orig index f454d46b..075ce47d 100644 --- a/src/tet3/inetlib/rdwr.c.orig +++ b/src/tet3/inetlib/rdwr.c.orig @@ -62,10 +62,6 @@ MODIFICATIONS: #include "tslib.h" #include "server_bs.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef NOTRACE static char msghdr[] = "message header"; static char msgdata[] = "message data"; diff --git a/src/tet3/inetlib/tccdaddr.c b/src/tet3/inetlib/tccdaddr.c index 35b0b887..5f6f3882 100644 --- a/src/tet3/inetlib/tccdaddr.c +++ b/src/tet3/inetlib/tccdaddr.c @@ -64,11 +64,6 @@ MODIFICATIONS: #include "ltoa.h" #include "inetlib_in.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_gettccdaddr() - look up the INET address and port number for ** a TCCD and store it in the related tptab entry diff --git a/src/tet3/inetlib/tccdport.c b/src/tet3/inetlib/tccdport.c index efcd837b..26c69f30 100644 --- a/src/tet3/inetlib/tccdport.c +++ b/src/tet3/inetlib/tccdport.c @@ -48,10 +48,6 @@ MODIFICATIONS: #include "ptab.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef NOTRACE #include "ltoa.h" #endif diff --git a/src/tet3/inetlib/tptab.c b/src/tet3/inetlib/tptab.c index 1aa75bd1..32a108e2 100644 --- a/src/tet3/inetlib/tptab.c +++ b/src/tet3/inetlib/tptab.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_ptalloc() - allocate transport-specific data element in a ptab diff --git a/src/tet3/inetlib/tsinfo.c b/src/tet3/inetlib/tsinfo.c index af2de380..e4846b58 100644 --- a/src/tet3/inetlib/tsinfo.c +++ b/src/tet3/inetlib/tsinfo.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "tsinfo_in.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct stdesc st[] = { TSINFO_DESC }; diff --git a/src/tet3/servlib/cloop.c b/src/tet3/servlib/cloop.c index 11e8acbe..c908c821 100644 --- a/src/tet3/servlib/cloop.c +++ b/src/tet3/servlib/cloop.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "error.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_si_clientloop() - perform a simple client service loop iteration ** for a single process, waiting for it to complete diff --git a/src/tet3/servlib/fio.c b/src/tet3/servlib/fio.c index 5907cbf9..bd2eddd0 100644 --- a/src/tet3/servlib/fio.c +++ b/src/tet3/servlib/fio.c @@ -61,10 +61,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** structure of the file table ** diff --git a/src/tet3/servlib/forkd.c b/src/tet3/servlib/forkd.c index 2896b080..9bbb5d65 100644 --- a/src/tet3/servlib/forkd.c +++ b/src/tet3/servlib/forkd.c @@ -49,10 +49,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_si_forkdaemon() - fork off a daemon process diff --git a/src/tet3/servlib/logon.c b/src/tet3/servlib/logon.c index 5748617e..df7afbfd 100644 --- a/src/tet3/servlib/logon.c +++ b/src/tet3/servlib/logon.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tslib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int ti_lo2 PROTOLIST((struct ptab *)); diff --git a/src/tet3/servlib/msgbuf.c b/src/tet3/servlib/msgbuf.c index 81e87db1..1fbeb2a4 100644 --- a/src/tet3/servlib/msgbuf.c +++ b/src/tet3/servlib/msgbuf.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ti_msgbuf() - return a pointer to a ptab message data buffer, ** growing it if necessary diff --git a/src/tet3/servlib/ptab.c b/src/tet3/servlib/ptab.c index c3a544e2..aae6a4ff 100644 --- a/src/tet3/servlib/ptab.c +++ b/src/tet3/servlib/ptab.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - struct ptab *tet_ptab; /* ptr to start of process table */ diff --git a/src/tet3/servlib/sdasync.c b/src/tet3/servlib/sdasync.c index 2acfd9d0..3e328204 100644 --- a/src/tet3/servlib/sdasync.c +++ b/src/tet3/servlib/sdasync.c @@ -57,10 +57,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_sdasync() - perform a generic auto-sync request ** diff --git a/src/tet3/servlib/sdsnget.c b/src/tet3/servlib/sdsnget.c index 700f359d..d3aeb8fa 100644 --- a/src/tet3/servlib/sdsnget.c +++ b/src/tet3/servlib/sdsnget.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_sdsnget() - get a sync id from SYNCD ** diff --git a/src/tet3/servlib/sdsnrm.c b/src/tet3/servlib/sdsnrm.c index b399a24c..fb0ba631 100644 --- a/src/tet3/servlib/sdsnrm.c +++ b/src/tet3/servlib/sdsnrm.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_sdsnrm() - remove a sync ID ** diff --git a/src/tet3/servlib/sdsnsys.c b/src/tet3/servlib/sdsnsys.c index 15196fbd..52cd3182 100644 --- a/src/tet3/servlib/sdsnsys.c +++ b/src/tet3/servlib/sdsnsys.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_sdsnsys() - send system name list to SYNCD ** diff --git a/src/tet3/servlib/sdtalk.c b/src/tet3/servlib/sdtalk.c index c970c229..d96fafe1 100644 --- a/src/tet3/servlib/sdtalk.c +++ b/src/tet3/servlib/sdtalk.c @@ -70,10 +70,6 @@ MODIFICATIONS: #include "avmsg.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - TET_IMPORT int tet_sderrno; /* tet_sdtalk reply code */ /* static function declarations */ diff --git a/src/tet3/servlib/sdusync.c b/src/tet3/servlib/sdusync.c index 012f54fa..cb776683 100644 --- a/src/tet3/servlib/sdusync.c +++ b/src/tet3/servlib/sdusync.c @@ -49,10 +49,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_sdusync() - perform a user-sync request ** diff --git a/src/tet3/servlib/server.c b/src/tet3/servlib/server.c index 337d0846..4d471663 100644 --- a/src/tet3/servlib/server.c +++ b/src/tet3/servlib/server.c @@ -55,10 +55,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void ti_rcvmsg PROTOLIST((struct ptab *)); diff --git a/src/tet3/servlib/sloop.c b/src/tet3/servlib/sloop.c index abaae47d..59c910fb 100644 --- a/src/tet3/servlib/sloop.c +++ b/src/tet3/servlib/sloop.c @@ -57,10 +57,6 @@ MODIFICATIONS: #include "dtetlib.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void si_procrun PROTOLIST((void)); diff --git a/src/tet3/servlib/smain.c b/src/tet3/servlib/smain.c index 13900a1a..2095ddad 100644 --- a/src/tet3/servlib/smain.c +++ b/src/tet3/servlib/smain.c @@ -51,10 +51,6 @@ MODIFICATIONS: #include "servlib.h" #include "tslib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_si_main() - generic server main processing function ** diff --git a/src/tet3/servlib/sproc.c b/src/tet3/servlib/sproc.c index f1136a3c..775b11e7 100644 --- a/src/tet3/servlib/sproc.c +++ b/src/tet3/servlib/sproc.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "avmsg.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void logonfail PROTOLIST((struct ptab *, int)); diff --git a/src/tet3/servlib/talk.c b/src/tet3/servlib/talk.c index 55f9762d..4ea443bd 100644 --- a/src/tet3/servlib/talk.c +++ b/src/tet3/servlib/talk.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ti_talk() - talk to a server and receive a reply ** diff --git a/src/tet3/servlib/tccfnam.c b/src/tet3/servlib/tccfnam.c index 45f33bcb..d0bb6eac 100644 --- a/src/tet3/servlib/tccfnam.c +++ b/src/tet3/servlib/tccfnam.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tccfname() - send OP_CFNAME message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tcconf.c b/src/tet3/servlib/tcconf.c index 099cdb77..f97fb514 100644 --- a/src/tet3/servlib/tcconf.c +++ b/src/tet3/servlib/tcconf.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int tc_cs PROTOLIST((int, int, char **, int, int)); static int tc_cs2 PROTOLIST((int, int, char **, int, int, int)); diff --git a/src/tet3/servlib/tcexec.c b/src/tet3/servlib/tcexec.c index 20436c76..06ca5ec2 100644 --- a/src/tet3/servlib/tcexec.c +++ b/src/tet3/servlib/tcexec.c @@ -48,10 +48,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcexec() - send OP_EXEC message to TCCD and receive a reply diff --git a/src/tet3/servlib/tcfio.c b/src/tet3/servlib/tcfio.c index 2606c262..9d7c7252 100644 --- a/src/tet3/servlib/tcfio.c +++ b/src/tet3/servlib/tcfio.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static char *tc_fio PROTOLIST((int, int)); diff --git a/src/tet3/servlib/tckill.c b/src/tet3/servlib/tckill.c index 91be798a..11c23d67 100644 --- a/src/tet3/servlib/tckill.c +++ b/src/tet3/servlib/tckill.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tckill() - send an OP_KILL message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tclfile.c b/src/tet3/servlib/tclfile.c index 207d7c1e..291568cd 100644 --- a/src/tet3/servlib/tclfile.c +++ b/src/tet3/servlib/tclfile.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tclockfile() - send an OP_LOCKFILE message to TCCD and receive ** a reply diff --git a/src/tet3/servlib/tcputenv.c b/src/tet3/servlib/tcputenv.c index e37cd7b3..e365e5ca 100644 --- a/src/tet3/servlib/tcputenv.c +++ b/src/tet3/servlib/tcputenv.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcputenv() - send a single line OP_PUTENV message to TCCD and diff --git a/src/tet3/servlib/tcrsys.c b/src/tet3/servlib/tcrsys.c index 7f6e49e6..eecfabe2 100644 --- a/src/tet3/servlib/tcrsys.c +++ b/src/tet3/servlib/tcrsys.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcrsys() - send remote system call message to TCCD diff --git a/src/tet3/servlib/tcrxfile.c b/src/tet3/servlib/tcrxfile.c index 0294f252..4bbc7d50 100644 --- a/src/tet3/servlib/tcrxfile.c +++ b/src/tet3/servlib/tcrxfile.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcrxfile() - send an OP_RXFILE message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tcsdir.c b/src/tet3/servlib/tcsdir.c index 35bda9bc..56fb1dba 100644 --- a/src/tet3/servlib/tcsdir.c +++ b/src/tet3/servlib/tcsdir.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcmksdir() - send an OP_MKSDIR message to TCCD and receive a reply diff --git a/src/tet3/servlib/tcshlock.c b/src/tet3/servlib/tcshlock.c index 55ecf30d..081bf397 100644 --- a/src/tet3/servlib/tcshlock.c +++ b/src/tet3/servlib/tcshlock.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcsharelock() - send an OP_SHARELOCK message to TCCD and receive a diff --git a/src/tet3/servlib/tcsname.c b/src/tet3/servlib/tcsname.c index b95cb1bc..46a4d710 100644 --- a/src/tet3/servlib/tcsname.c +++ b/src/tet3/servlib/tcsname.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcsysname() - send OP_SYSNAME message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tctalk.c b/src/tet3/servlib/tctalk.c index 98be7fa9..02674e6c 100644 --- a/src/tet3/servlib/tctalk.c +++ b/src/tet3/servlib/tctalk.c @@ -66,10 +66,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - int tet_tcerrno; /* tet_tctalk message reply code */ diff --git a/src/tet3/servlib/tctdir.c b/src/tet3/servlib/tctdir.c index a1f91d69..e382237b 100644 --- a/src/tet3/servlib/tctdir.c +++ b/src/tet3/servlib/tctdir.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcmktmpdir() - send an OP_MKTMPDIR message to TCCD and receive diff --git a/src/tet3/servlib/tctime.c b/src/tet3/servlib/tctime.c index 77fb101e..d5077e2f 100644 --- a/src/tet3/servlib/tctime.c +++ b/src/tet3/servlib/tctime.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tctime() - send OP_TIME message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tctsfile.c b/src/tet3/servlib/tctsfile.c index 063e7196..8fb6c347 100644 --- a/src/tet3/servlib/tctsfile.c +++ b/src/tet3/servlib/tctsfile.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int tc_tsfiles PROTOLIST((int, char **, int, char *, char *, int)); diff --git a/src/tet3/servlib/tcwait.c b/src/tet3/servlib/tcwait.c index 2bd8bac2..21c79d8d 100644 --- a/src/tet3/servlib/tcwait.c +++ b/src/tet3/servlib/tcwait.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcwait() - send an OP_WAIT message to TCCD and receive a reply ** diff --git a/src/tet3/servlib/tcxconf.c b/src/tet3/servlib/tcxconf.c index 6851d415..57768430 100644 --- a/src/tet3/servlib/tcxconf.c +++ b/src/tet3/servlib/tcxconf.c @@ -46,10 +46,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tet3_config.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* scratchpad variable lists */ static struct cflist scfg, tcfg; diff --git a/src/tet3/servlib/titcmenv.c b/src/tet3/servlib/titcmenv.c index def08452..80bdd0ca 100644 --- a/src/tet3/servlib/titcmenv.c +++ b/src/tet3/servlib/titcmenv.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ti_tcmputenv() - put ti args in the environment for TCM diff --git a/src/tet3/servlib/xdcfnam.c b/src/tet3/servlib/xdcfnam.c index e9ae14c1..dd33892a 100644 --- a/src/tet3/servlib/xdcfnam.c +++ b/src/tet3/servlib/xdcfnam.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdcfname() - send OP_CFNAME message to XRESD and receive a reply ** diff --git a/src/tet3/servlib/xdcodesf.c b/src/tet3/servlib/xdcodesf.c index bfcb856f..ab964f70 100644 --- a/src/tet3/servlib/xdcodesf.c +++ b/src/tet3/servlib/xdcodesf.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdcodesfile() - send OP_CODESF message to XRESD and receive a reply ** diff --git a/src/tet3/servlib/xdfio.c b/src/tet3/servlib/xdfio.c index c1216c25..4440b297 100644 --- a/src/tet3/servlib/xdfio.c +++ b/src/tet3/servlib/xdfio.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static char *xd_fio PROTOLIST((int)); diff --git a/src/tet3/servlib/xdictp.c b/src/tet3/servlib/xdictp.c index cef28f2f..2c11d717 100644 --- a/src/tet3/servlib/xdictp.c +++ b/src/tet3/servlib/xdictp.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdicstart() - send an OP_ICSTART message to XRESD and receive diff --git a/src/tet3/servlib/xdrcfnam.c b/src/tet3/servlib/xdrcfnam.c index 6fe6ddfc..3671b5b8 100644 --- a/src/tet3/servlib/xdrcfnam.c +++ b/src/tet3/servlib/xdrcfnam.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdrcfname() - send OP_RCFNAME message to XRESD and receive a reply ** diff --git a/src/tet3/servlib/xdresult.c b/src/tet3/servlib/xdresult.c index abe84156..fc1e42ae 100644 --- a/src/tet3/servlib/xdresult.c +++ b/src/tet3/servlib/xdresult.c @@ -42,10 +42,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdresult() - send an OP_RESULT message to XRESD and receive diff --git a/src/tet3/servlib/xdtalk.c b/src/tet3/servlib/xdtalk.c index f59050cd..e2132aaa 100644 --- a/src/tet3/servlib/xdtalk.c +++ b/src/tet3/servlib/xdtalk.c @@ -71,10 +71,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - TET_IMPORT int tet_xderrno; /* tet_xdtalk reply code */ diff --git a/src/tet3/servlib/xdxfile.c b/src/tet3/servlib/xdxfile.c index 42fdfe44..73e9fc81 100644 --- a/src/tet3/servlib/xdxfile.c +++ b/src/tet3/servlib/xdxfile.c @@ -48,10 +48,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int xd_tfclose PROTOLIST((int)); static long xd_tfopen PROTOLIST((char *, int)); diff --git a/src/tet3/servlib/xdxrclose.c b/src/tet3/servlib/xdxrclose.c index 52070bc5..580b0d9c 100644 --- a/src/tet3/servlib/xdxrclose.c +++ b/src/tet3/servlib/xdxrclose.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdxrclose() - send an OP_XRCLOSE message to XRESD and receive ** a reply diff --git a/src/tet3/servlib/xdxres.c b/src/tet3/servlib/xdxres.c index 827d60b6..aff1c181 100644 --- a/src/tet3/servlib/xdxres.c +++ b/src/tet3/servlib/xdxres.c @@ -51,10 +51,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdxres() - send a single line OP_XRES message to XRESD and receive diff --git a/src/tet3/servlib/xdxropen.c b/src/tet3/servlib/xdxropen.c index 22b46874..06190689 100644 --- a/src/tet3/servlib/xdxropen.c +++ b/src/tet3/servlib/xdxropen.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdxropen() - send an OP_XROPEN message to XRESD and receive a reply ** diff --git a/src/tet3/servlib/xdxrsend.c b/src/tet3/servlib/xdxrsend.c index b5162e07..5325bd9f 100644 --- a/src/tet3/servlib/xdxrsend.c +++ b/src/tet3/servlib/xdxrsend.c @@ -44,10 +44,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdxrsend() - send an OP_XRSEND message to XRESD and receive ** a reply diff --git a/src/tet3/servlib/xdxrsys.c b/src/tet3/servlib/xdxrsys.c index 0a914fca..91534258 100644 --- a/src/tet3/servlib/xdxrsys.c +++ b/src/tet3/servlib/xdxrsys.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_xdxrsys() - send an OP_XRSYS message to XRESD and receive a reply ** diff --git a/src/tet3/syncd/fake.c b/src/tet3/syncd/fake.c index 3a2165f3..d19b05f4 100644 --- a/src/tet3/syncd/fake.c +++ b/src/tet3/syncd/fake.c @@ -41,10 +41,6 @@ MODIFICATIONS: #include "error.h" #include "server.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ss_connect() - fake connect routine for syncd ** diff --git a/src/tet3/syncd/stab.c b/src/tet3/syncd/stab.c index 0e333d51..38d994c1 100644 --- a/src/tet3/syncd/stab.c +++ b/src/tet3/syncd/stab.c @@ -90,10 +90,6 @@ MODIFICATIONS: #include "ftoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* the largest sync point number */ #define SPMAX ((long) ((unsigned long) ~0 >> 1)) diff --git a/src/tet3/syncd/syncd.c b/src/tet3/syncd/syncd.c index f6c65844..88f9047d 100644 --- a/src/tet3/syncd/syncd.c +++ b/src/tet3/syncd/syncd.c @@ -76,10 +76,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tslib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /************************************************************************ ** * diff --git a/src/tet3/syncd/syncd_bs.c b/src/tet3/syncd/syncd_bs.c index 9f9e81b1..105ac07a 100644 --- a/src/tet3/syncd/syncd_bs.c +++ b/src/tet3/syncd/syncd_bs.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "avmsg.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char reqerr[] = "unknown request code"; /* diff --git a/src/tet3/syncd/syncd_in.c b/src/tet3/syncd/syncd_in.c index 44d0b014..2608c27e 100644 --- a/src/tet3/syncd/syncd_in.c +++ b/src/tet3/syncd/syncd_in.c @@ -48,10 +48,6 @@ MODIFICATIONS: #include "server_in.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* socket on which to listen */ SOCKET tet_listen_sd = 0; diff --git a/src/tet3/syncd/syncd_xt.c b/src/tet3/syncd/syncd_xt.c index 12af71fd..ab44db3e 100644 --- a/src/tet3/syncd/syncd_xt.c +++ b/src/tet3/syncd/syncd_xt.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "server_xt.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - int tet_listen_fd = 0; /* descriptor on which to listen */ char *tet_tpname = (char *)0; /* Transport provider name */ struct t_call *tet_calls[MAX_CONN_IND]; /* to hold connection indications */ diff --git a/src/tet3/syncd/synproc.c b/src/tet3/syncd/synproc.c index 2a617d87..b9f4d92e 100644 --- a/src/tet3/syncd/synproc.c +++ b/src/tet3/syncd/synproc.c @@ -70,10 +70,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void op_s2 PROTOLIST((struct ptab *, struct stab *, struct valmsg *)); diff --git a/src/tet3/tcc/cleanup.c b/src/tet3/tcc/cleanup.c index e0b4f2ac..64415809 100644 --- a/src/tet3/tcc/cleanup.c +++ b/src/tet3/tcc/cleanup.c @@ -49,11 +49,6 @@ MODIFICATIONS: #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tcc_exit() - clean up and exit */ diff --git a/src/tet3/tcc/config.c b/src/tet3/tcc/config.c index ae75aa5c..a6f928bc 100644 --- a/src/tet3/tcc/config.c +++ b/src/tet3/tcc/config.c @@ -79,10 +79,6 @@ MODIFICATIONS: #include "tcc.h" #include "dtcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* default config file names on each system */ static char *defcfname[] = { "tetbuild.cfg", diff --git a/src/tet3/tcc/copysave.c b/src/tet3/tcc/copysave.c index 3f7d9c40..3acd2060 100644 --- a/src/tet3/tcc/copysave.c +++ b/src/tet3/tcc/copysave.c @@ -64,11 +64,6 @@ MODIFICATIONS: #include "tcc.h" #include "tcclib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void inittd2 PROTOLIST((struct systab *)); static void inittd3 PROTOLIST((int, char [], int)); diff --git a/src/tet3/tcc/dirtab.c b/src/tet3/tcc/dirtab.c index 601570ba..abf338d0 100644 --- a/src/tet3/tcc/dirtab.c +++ b/src/tet3/tcc/dirtab.c @@ -46,10 +46,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* number of entries in an array */ #define NUMENTRIES(x) (sizeof x / sizeof x[0]) diff --git a/src/tet3/tcc/dtcc.c b/src/tet3/tcc/dtcc.c index 92b29864..5756117f 100644 --- a/src/tet3/tcc/dtcc.c +++ b/src/tet3/tcc/dtcc.c @@ -62,10 +62,6 @@ MODIFICATIONS: #include "tcc.h" #include "dtcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - extern char **ENVIRON; /* ptrs to syncd and xresd ptabs */ diff --git a/src/tet3/tcc/environ.c b/src/tet3/tcc/environ.c index 2ab87ea6..a2dea608 100644 --- a/src/tet3/tcc/environ.c +++ b/src/tet3/tcc/environ.c @@ -52,11 +52,6 @@ MODIFICATIONS: #include "systab.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void init1environ PROTOLIST((struct systab *)); diff --git a/src/tet3/tcc/error.c b/src/tet3/tcc/error.c index 7fc8cff2..25d1071b 100644 --- a/src/tet3/tcc/error.c +++ b/src/tet3/tcc/error.c @@ -61,25 +61,18 @@ MODIFICATIONS: #include "proctab.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #define MSGSIZE ((MAXPATH * 2) + 128) /* size of a message buffer */ /* static function declarations */ -static void errfmt PROTOLIST((int, char *, int, char *, char *, char *, - char [])); - +static void errfmt PROTOLIST((int, const char *, int, const char *, + const char *, const char *, char [])); /* ** tcc_error() - TCC error handler */ -void tcc_error(errnum, file, line, s1, s2) -int errnum, line; -char *file, *s1, *s2; +void tcc_error(int errnum, const char *file, int line, const char *s1, + const char *s2) { char msg[MSGSIZE]; @@ -99,10 +92,8 @@ char *file, *s1, *s2; ** tcc_fatal() - TCC fatal error handler */ -void tcc_fatal(errnum, file, line, s1, s2) -int errnum, line; -char *file; -char *s1, *s2; +void tcc_fatal(int errnum, const char *file, int line, const char *s1, + const char *s2) { tcc_error(errnum, file, line, s1, s2); tcc_exit(1); @@ -113,10 +104,8 @@ char *s1, *s2; ** for use during test case execution */ -void tcc_prperror(prp, sysid, errnum, file, line, s1, s2) -struct proctab *prp; -int sysid, errnum, line; -char *file, *s1, *s2; +void tcc_prperror(struct proctab *prp, int sysid, int errnum, const char *file, + int line, const char *s1, const char *s2) { static char fmt[] = "on system %03d"; char text[sizeof fmt + LNUMSZ]; @@ -138,9 +127,8 @@ char *file, *s1, *s2; ** errfmt() - format an error message into the msg buffer */ -static void errfmt(errnum, file, line, s1, s2, s3, msg) -int errnum, line; -char *file, *s1, *s2, *s3, msg[]; +static void errfmt(int errnum, const char *file, int line, const char *s1, + const char *s2, const char *s3, char msg[]) { register char *p = msg; diff --git a/src/tet3/tcc/exec.c b/src/tet3/tcc/exec.c index 30e08484..a29e012d 100644 --- a/src/tet3/tcc/exec.c +++ b/src/tet3/tcc/exec.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "tcc.h" #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tcc_texec() - execute a test case on the specified system diff --git a/src/tet3/tcc/fake.c b/src/tet3/tcc/fake.c index ece41b03..a4393b40 100644 --- a/src/tet3/tcc/fake.c +++ b/src/tet3/tcc/fake.c @@ -45,10 +45,6 @@ MODIFICATIONS: #include "error.h" #include "server.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ss_serverloop() - server-specific server loop ** diff --git a/src/tet3/tcc/fake_in.c b/src/tet3/tcc/fake_in.c index bc41185e..03312e4e 100644 --- a/src/tet3/tcc/fake_in.c +++ b/src/tet3/tcc/fake_in.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "ptab.h" #include "server_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* tcc does not listen for or accept incoming connections */ SOCKET tet_listen_sd = INVALID_SOCKET; diff --git a/src/tet3/tcc/fake_xt.c b/src/tet3/tcc/fake_xt.c index 5c4e4e22..c65dfcd6 100644 --- a/src/tet3/tcc/fake_xt.c +++ b/src/tet3/tcc/fake_xt.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "ptab.h" #include "server_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* tcc does not listen for or accept incoming connections */ int tet_listen_fd = -1; diff --git a/src/tet3/tcc/jnlproc.c b/src/tet3/tcc/jnlproc.c index 84543527..07b347bb 100644 --- a/src/tet3/tcc/jnlproc.c +++ b/src/tet3/tcc/jnlproc.c @@ -62,10 +62,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* structure used when re-ordering xres lines */ struct xrlist { int xr_id; /* xres line id */ diff --git a/src/tet3/tcc/journal.c b/src/tet3/tcc/journal.c index 1f21542c..6dd5a5c5 100644 --- a/src/tet3/tcc/journal.c +++ b/src/tet3/tcc/journal.c @@ -82,10 +82,6 @@ MODIFICATIONS: #include "tet3_config.h" #include "tet_jrnl.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* TETware version number */ #ifdef TET_LITE /* -LITE-CUT-LINE- */ char tcc_version[] = "3.3-lite"; diff --git a/src/tet3/tcc/lock.c b/src/tet3/tcc/lock.c index 562afa3b..217607b1 100644 --- a/src/tet3/tcc/lock.c +++ b/src/tet3/tcc/lock.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "tcc.h" #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tcc_lock() - acquire a shared lock or an exclusive lock ** diff --git a/src/tet3/tcc/procdir.c b/src/tet3/tcc/procdir.c index caa0173f..0b13865b 100644 --- a/src/tet3/tcc/procdir.c +++ b/src/tet3/tcc/procdir.c @@ -63,10 +63,6 @@ MODIFICATIONS: #include "proctab.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int count_tc PROTOLIST((struct scentab *, int)); diff --git a/src/tet3/tcc/proctab.c b/src/tet3/tcc/proctab.c index 9ebe9c87..1f396fb4 100644 --- a/src/tet3/tcc/proctab.c +++ b/src/tet3/tcc/proctab.c @@ -50,11 +50,6 @@ MODIFICATIONS: #include "proctab.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* the execution engine's run queue */ struct proctab *runq; diff --git a/src/tet3/tcc/proctab.h b/src/tet3/tcc/proctab.h index 1762c4ad..078e34ad 100644 --- a/src/tet3/tcc/proctab.h +++ b/src/tet3/tcc/proctab.h @@ -161,16 +161,12 @@ struct proctab { /* context-dependent error handler */ #ifdef TET_LITE /* -LITE-CUT-LINE- */ # define prperror(prp, sysid, errnum, s1, s2) \ - tcc_prperror(prp, -1, errnum, srcFile, __LINE__, s1, s2) + tcc_prperror(prp, -1, errnum, __FILE__, __LINE__, s1, s2) #else /* -START-LITE-CUT- */ # define prperror(prp, sysid, errnum, s1, s2) \ - tcc_prperror(prp, sysid, errnum, srcFile, __LINE__, s1, s2) + tcc_prperror(prp, sysid, errnum, __FILE__, __LINE__, s1, s2) #endif /* TET_LITE */ /* -END-LITE-CUT- */ -#ifndef NEEDsrcFile -#define NEEDsrcFile -#endif - /* the execution engine's run queue */ extern struct proctab *runq; @@ -238,8 +234,8 @@ extern int sfproc PROTOLIST((struct proctab *, char **, int)); extern int tcc_lock PROTOLIST((struct proctab *, int, char *, char [], int)); extern int tcc_mkalldirs PROTOLIST((struct proctab *, char *)); extern int tcc_mktmpdir PROTOLIST((struct proctab *, char *, char **)); -extern void tcc_prperror PROTOLIST((struct proctab *, int, int, char *, int, - char *, char *)); +extern void tcc_prperror PROTOLIST((struct proctab *, int, int, const char *, int, + const char *, const char *)); extern int tcc_rmtmpdir PROTOLIST((struct proctab *, char *)); extern int tccopy PROTOLIST((struct proctab *, char *, char *)); extern long tcc_texec PROTOLIST((struct proctab *, char *, char **, char *, diff --git a/src/tet3/tcc/proctc.c b/src/tet3/tcc/proctc.c index c67ae80b..ec8d32f3 100644 --- a/src/tet3/tcc/proctc.c +++ b/src/tet3/tcc/proctc.c @@ -65,10 +65,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int nexttcstate PROTOLIST((struct proctab *, int)); diff --git a/src/tet3/tcc/proctcd.c b/src/tet3/tcc/proctcd.c index 30905780..dab37eb4 100644 --- a/src/tet3/tcc/proctcd.c +++ b/src/tet3/tcc/proctcd.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "systab.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int conf1tccd PROTOLIST((struct proctab *, int, int)); static void rm_snid PROTOLIST((struct proctab *)); diff --git a/src/tet3/tcc/rescode.c b/src/tet3/tcc/rescode.c index d5906e6b..72a445b7 100644 --- a/src/tet3/tcc/rescode.c +++ b/src/tet3/tcc/rescode.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "systab.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* name of the temporary master results code file name */ static char *rcftmp; diff --git a/src/tet3/tcc/resdir.c b/src/tet3/tcc/resdir.c index 4a7c71f9..8f4bc0dc 100644 --- a/src/tet3/tcc/resdir.c +++ b/src/tet3/tcc/resdir.c @@ -48,11 +48,6 @@ MODIFICATIONS: #include "tetdir.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* results directory name - gets overwritten by initresdir() */ static char *results_dir = "results"; diff --git a/src/tet3/tcc/rrproc.c b/src/tet3/tcc/rrproc.c index fde08fb7..b74b8df8 100644 --- a/src/tet3/tcc/rrproc.c +++ b/src/tet3/tcc/rrproc.c @@ -64,10 +64,6 @@ MODIFICATIONS: #include "tcc.h" #include "tet_jrnl.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* rescodes and modes of operation from the command-line */ static int *rrcodes; static int lrrcodes, nrrcodes; diff --git a/src/tet3/tcc/scen1.c b/src/tet3/tcc/scen1.c index 97ef6f82..57fa3dde 100644 --- a/src/tet3/tcc/scen1.c +++ b/src/tet3/tcc/scen1.c @@ -70,11 +70,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* some limits which apply to directives */ /* max number of semicolon-delimited fields in group execution */ #define MAXFLDS (LBUFLEN / 8) diff --git a/src/tet3/tcc/scen2.c b/src/tet3/tcc/scen2.c index f8d4c6d4..c6d6bb1a 100644 --- a/src/tet3/tcc/scen2.c +++ b/src/tet3/tcc/scen2.c @@ -58,10 +58,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void check_nesting PROTOLIST((struct scentab *, struct scentab **)); static int check_timed_loops PROTOLIST((struct scentab *)); diff --git a/src/tet3/tcc/scen3.c b/src/tet3/tcc/scen3.c index f46f7026..1953068d 100644 --- a/src/tet3/tcc/scen3.c +++ b/src/tet3/tcc/scen3.c @@ -54,11 +54,6 @@ MODIFICATIONS: #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* static function declarations */ static void add_scenrefs PROTOLIST((struct scentab *)); static void copy_r2 PROTOLIST((struct scentab *, struct scentab *, diff --git a/src/tet3/tcc/scenario.c b/src/tet3/tcc/scenario.c index b710a79b..a4c11395 100644 --- a/src/tet3/tcc/scenario.c +++ b/src/tet3/tcc/scenario.c @@ -65,10 +65,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* list of scenario lines specified by -l command-line options */ static char **cmdscen; static int lcmdscen; diff --git a/src/tet3/tcc/scenpp.c b/src/tet3/tcc/scenpp.c index fef902be..d287ece9 100644 --- a/src/tet3/tcc/scenpp.c +++ b/src/tet3/tcc/scenpp.c @@ -66,10 +66,6 @@ MODIFICATIONS: #include "dirtab.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* command-line options */ static int printscrefs = 0; diff --git a/src/tet3/tcc/scentab.c b/src/tet3/tcc/scentab.c index 45b2908d..4881fc50 100644 --- a/src/tet3/tcc/scentab.c +++ b/src/tet3/tcc/scentab.c @@ -59,11 +59,6 @@ MODIFICATIONS: #include "dirtab.h" #include "tcc.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* the linear scenario list - generated by pass 1*/ struct scentab *sclist; diff --git a/src/tet3/tcc/service.c b/src/tet3/tcc/service.c index 635e401e..763151d4 100644 --- a/src/tet3/tcc/service.c +++ b/src/tet3/tcc/service.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void proc_directive PROTOLIST((struct proctab *)); diff --git a/src/tet3/tcc/sigtrap.c b/src/tet3/tcc/sigtrap.c index e2fac7bc..7ebd0b0d 100644 --- a/src/tet3/tcc/sigtrap.c +++ b/src/tet3/tcc/sigtrap.c @@ -56,11 +56,6 @@ MODIFICATIONS: #include "tcc.h" #include "tcclib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* signal dispositions on startup */ static void (*orig_sighup) PROTOLIST((int)); static void (*orig_sigquit) PROTOLIST((int)); diff --git a/src/tet3/tcc/syscall.c b/src/tet3/tcc/syscall.c index db71034f..4da189ac 100644 --- a/src/tet3/tcc/syscall.c +++ b/src/tet3/tcc/syscall.c @@ -72,10 +72,6 @@ MODIFICATIONS: int tet_tcerrno; /* fake TCCD reply code */ #endif /* -LITE-CUT-LINE- */ -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** all these functions set tet_tcerrno on return ** diff --git a/src/tet3/tcc/systab.c b/src/tet3/tcc/systab.c index 03e5359f..7dea9194 100644 --- a/src/tet3/tcc/systab.c +++ b/src/tet3/tcc/systab.c @@ -57,10 +57,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct systab *systab; /* head of the system table */ /* static function declarations */ diff --git a/src/tet3/tcc/tcc.c b/src/tet3/tcc/tcc.c index e2f67844..094445e5 100644 --- a/src/tet3/tcc/tcc.c +++ b/src/tet3/tcc/tcc.c @@ -78,10 +78,6 @@ MODIFICATIONS: #include "tcc.h" #include "keys.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - sigset_t tet_blockable_sigs; /* signals blocked by tet_sigsafe_start() */ @@ -527,10 +523,10 @@ char **argv; static void badusage() { - static char *options[] = { - (char *) 0, /* placeholder for tet_progname */ + static const char *options[] = { + 0, /* placeholder for tet_progname */ "-{bec}", - (char *) 0, /* placeholder for "-{m|r} codelist" */ + 0, /* placeholder for "-{m|r} codelist" */ "[-I]", "[-a alt-exec-dir]", "[-f clean-config-file]", @@ -549,7 +545,7 @@ static void badusage() "[test-suite [scenario]]" }; int n, pos; - char *opt, *sep; + const char *opt, *sep; options[0] = tet_progname; diff --git a/src/tet3/tcc/tcc.h b/src/tet3/tcc/tcc.h index 126feeb8..d939e719 100644 --- a/src/tet3/tcc/tcc.h +++ b/src/tet3/tcc/tcc.h @@ -134,12 +134,9 @@ extern int tet_tcerrno; extern void rbufchk PROTOLIST((char **, int *, int)); # define RBUFCHK(bpp, lp, newlen) rbufchk(bpp, lp, newlen) #else /* NOTRACE */ -extern void rbuftrace PROTOLIST((char **, int *, int, char *, int)); +extern void rbuftrace PROTOLIST((char **, int *, int, const char *, int)); # define RBUFCHK(bpp, lp, newlen) \ - rbuftrace(bpp, lp, newlen, srcFile, __LINE__) -# ifndef NEEDsrcFile -# define NEEDsrcFile -# endif /* NEEDsrcFile */ + rbuftrace(bpp, lp, newlen, __FILE__, __LINE__) #endif /* NOTRACE */ /* flag values used with yesstr(), nostr() and okstr() calls */ @@ -157,7 +154,7 @@ extern void exec_block_signals PROTOLIST((void)); extern int execscen PROTOLIST((void)); extern void execsigtrap PROTOLIST((void)); extern void exec_unblock_signals PROTOLIST((void)); -extern void fullpath PROTOLIST((char *, char *, char [], int, int)); +extern void fullpath PROTOLIST((const char *, const char *, char [], int, int)); extern char *get_runtime_tsroot PROTOLIST((int)); extern char *getcfg PROTOLIST((char *, int, int)); extern int getcflag PROTOLIST((char *, int, int)); @@ -221,9 +218,9 @@ extern int symax PROTOLIST((void)); extern int tcc_access PROTOLIST((int, char *, int)); extern int tcc_chdir PROTOLIST((int, char *)); extern void tcc_dirname PROTOLIST((char *, char [], int)); -extern void tcc_error PROTOLIST((int, char *, int, char *, char *)); +extern void tcc_error PROTOLIST((int, const char *, int, const char *, const char *)); extern void tcc_exit PROTOLIST((int)); -extern void tcc_fatal PROTOLIST((int, char *, int, char *, char *)); +extern void tcc_fatal PROTOLIST((int, const char *, int, const char *, const char *)); extern int tcc_kill PROTOLIST((int, long, int)); extern int tcc_mkdir PROTOLIST((int, char *)); extern int tcc_putenv PROTOLIST((int, char *)); diff --git a/src/tet3/tcc/tcc_bs.c b/src/tet3/tcc/tcc_bs.c index f90d015f..50011dd5 100644 --- a/src/tet3/tcc/tcc_bs.c +++ b/src/tet3/tcc/tcc_bs.c @@ -67,10 +67,6 @@ MODIFICATIONS: #include "tcc.h" #include "dtcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char reqerr[] = "unknown request code"; /* diff --git a/src/tet3/tcc/tcc_in.c b/src/tet3/tcc/tcc_in.c index ff79abf3..c314a2dd 100644 --- a/src/tet3/tcc/tcc_in.c +++ b/src/tet3/tcc/tcc_in.c @@ -83,10 +83,6 @@ MODIFICATIONS: #include "tcc.h" #include "dtcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int ts_ss2 PROTOLIST((struct ptab *, char **, SOCKET)); diff --git a/src/tet3/tcc/tcc_xt.c b/src/tet3/tcc/tcc_xt.c index 3b6765ca..4603647e 100644 --- a/src/tet3/tcc/tcc_xt.c +++ b/src/tet3/tcc/tcc_xt.c @@ -86,11 +86,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tslib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - char *tet_tpname = "/dev/tcp"; /* Transport provider name for XTI based tcc */ int tet_tpi_mode = -1; /* Transport provider mode */ diff --git a/src/tet3/tcc/tcname.c b/src/tet3/tcc/tcname.c index 26329969..dce83176 100644 --- a/src/tet3/tcc/tcname.c +++ b/src/tet3/tcc/tcname.c @@ -50,10 +50,6 @@ MODIFICATIONS: #include "proctab.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tcsrcname() - return the full path name of a testcase below the ** source directory diff --git a/src/tet3/tcc/tool.c b/src/tet3/tcc/tool.c index 945c05cc..565a7371 100644 --- a/src/tet3/tcc/tool.c +++ b/src/tet3/tcc/tool.c @@ -70,10 +70,6 @@ MODIFICATIONS: #include "tet_jrnl.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void ocf2jnl2 PROTOLIST((struct proctab *, char *)); @@ -251,8 +247,11 @@ int tcnamelen; ** or tool */ if (pass_tcname) { + /* XXX[aplattner]: This cast casts away constness. This should + ** be fixed correctly at some point. + */ tooladdargv(&argv, &argvlen, &argc, - argc > 0 ? tet_basename(tcname) : tcname, 0); + argc > 0 ? (char*)tet_basename(tcname) : tcname, 0); if (pass_iclist) tooladdargv(&argv, &argvlen, &argc, prp->pr_exiclist, 0); } @@ -658,7 +657,7 @@ static void xresfilename(tcpath, xrfname, xrfnamelen) char *tcpath, *xrfname; int xrfnamelen; { - char *tcname = tet_basename(tcpath); + const char *tcname = tet_basename(tcpath); char logname[64]; sprintf(logname, "%.*s.log", sizeof(logname) - 5, tcname); diff --git a/src/tet3/tcc/utils.c b/src/tet3/tcc/utils.c index 006212dc..7a43f914 100644 --- a/src/tet3/tcc/utils.c +++ b/src/tet3/tcc/utils.c @@ -55,10 +55,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** rstrstore() - reliable strstore() call @@ -97,9 +93,7 @@ int *lp, newlen; ** rbuftrace() - reliable tet_buftrace() call */ -void rbuftrace(bpp, lp, newlen, file, line) -char **bpp, *file; -int *lp, newlen, line; +void rbuftrace(char **bpp, int *lp, int newlen, const char *file, int line) { if (tet_buftrace(bpp, lp, newlen, file, line) < 0) fatal(0, "can't continue", (char *) 0); @@ -208,9 +202,7 @@ int dirlen; ** on return up to pathlen bytes are copied to the path array */ -void fullpath(dir, file, path, pathlen, remote) -char *dir, *file, path[]; -int pathlen, remote; +void fullpath(const char *dir, const char *file, char path[], int pathlen, int remote) { register char *p = path; register int len; diff --git a/src/tet3/tcc/ynstr.c b/src/tet3/tcc/ynstr.c index 9e6c4e98..1566dd1a 100644 --- a/src/tet3/tcc/ynstr.c +++ b/src/tet3/tcc/ynstr.c @@ -46,10 +46,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcc.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* the lists of -y and -n strings from the command line */ static char **ylcmd, **nlcmd; static int Nylcmd, Nnlcmd; diff --git a/src/tet3/tccd/config.c b/src/tet3/tccd/config.c index ac3a453c..f39afac4 100644 --- a/src/tet3/tccd/config.c +++ b/src/tet3/tccd/config.c @@ -65,10 +65,6 @@ MODIFICATIONS: #include "config.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* values for cflags below (a bit field) */ #define CF_SINPROGRESS 001 /* sndconf in progress */ diff --git a/src/tet3/tccd/etab.c b/src/tet3/tccd/etab.c index 60ca53c8..507a7242 100644 --- a/src/tet3/tccd/etab.c +++ b/src/tet3/tccd/etab.c @@ -54,10 +54,6 @@ MODIFICATIONS: static struct etab *etab; /* ptr to head of exec table */ -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** etalloc() - allocate an exec table element and return a pointer thereto diff --git a/src/tet3/tccd/exec.c b/src/tet3/tccd/exec.c index 92bc4a5d..9fe72c26 100644 --- a/src/tet3/tccd/exec.c +++ b/src/tet3/tccd/exec.c @@ -71,11 +71,6 @@ MODIFICATIONS: #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* static function declarations */ static int op_e2 PROTOLIST((struct ptab *)); static int op_e3 PROTOLIST((struct ptab *, struct etab *)); diff --git a/src/tet3/tccd/log.c b/src/tet3/tccd/log.c index 7c51024b..31de8288 100644 --- a/src/tet3/tccd/log.c +++ b/src/tet3/tccd/log.c @@ -57,11 +57,6 @@ MODIFICATIONS: #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* the log file stream pointer */ static FILE *lfp; @@ -138,9 +133,7 @@ char *s1, *s2; ** logerror() - TCCD error printing routine */ -void logerror(errnum, file, line, s1, s2) -int errnum, line; -char *file, *s1, *s2; +void logerror(int errnum, const char *file, int line, const char *s1, const char *s2) { tet_prerror(getlogfp(), errnum, loghdr(), file, line, s1, s2); } diff --git a/src/tet3/tccd/log.c.orig b/src/tet3/tccd/log.c.orig index 14e5a3b9..9e4e5e96 100644 --- a/src/tet3/tccd/log.c.orig +++ b/src/tet3/tccd/log.c.orig @@ -53,11 +53,6 @@ MODIFICATIONS: #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* the log file stream pointer */ static FILE *lfp = stderr; diff --git a/src/tet3/tccd/stcc.c b/src/tet3/tccd/stcc.c index 58851e38..f4c4e856 100644 --- a/src/tet3/tccd/stcc.c +++ b/src/tet3/tccd/stcc.c @@ -70,10 +70,6 @@ MODIFICATIONS: #include "tccd.h" #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* mode for created directories */ #define DIRMODE ((mode_t) (S_IRWXU | S_IRWXG | S_IRWXO)) diff --git a/src/tet3/tccd/tccd.c b/src/tet3/tccd/tccd.c index c302a729..e887b247 100644 --- a/src/tet3/tccd/tccd.c +++ b/src/tet3/tccd/tccd.c @@ -96,11 +96,6 @@ MODIFICATIONS: #include "tccd.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* global variables */ struct ptab *tet_sdptab; /* ptr to SYNCD ptab element */ struct ptab *tet_xdptab; /* ptr to XRESD ptab element */ diff --git a/src/tet3/tccd/tccd_bs.c b/src/tet3/tccd/tccd_bs.c index e5c3a171..0a4b4f65 100644 --- a/src/tet3/tccd/tccd_bs.c +++ b/src/tet3/tccd/tccd_bs.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "server_bs.h" #include "tccd_bs.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char reqerr[] = "unknown request code"; diff --git a/src/tet3/tccd/tccd_in.c b/src/tet3/tccd/tccd_in.c index d9b18587..94f833f5 100644 --- a/src/tet3/tccd/tccd_in.c +++ b/src/tet3/tccd/tccd_in.c @@ -86,10 +86,6 @@ MODIFICATIONS: /* only the INETD version on supported on WIN32 platforms */ -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char rhostname[256]; /* remote host name */ #ifdef INETD diff --git a/src/tet3/tccd/tccd_xt.c b/src/tet3/tccd/tccd_xt.c index 189912a7..a38b49e9 100644 --- a/src/tet3/tccd/tccd_xt.c +++ b/src/tet3/tccd/tccd_xt.c @@ -78,10 +78,6 @@ MODIFICATIONS: #include "servlib.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - char *tet_tpname = "/dev/tcp"; /* transport interface provider name */ int tet_tpi_mode = -1; /* transport provider mode */ diff --git a/src/tet3/tccd/tsfile.c b/src/tet3/tccd/tsfile.c index 0f3c6c54..fb3d2d1e 100644 --- a/src/tet3/tccd/tsfile.c +++ b/src/tet3/tccd/tsfile.c @@ -77,11 +77,6 @@ MODIFICATIONS: /* creation mode for diretories */ #define DIRMODE ((mode_t) (S_IRWXU | S_IRWXG | S_IRWXO)) - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static variables */ static char *sfdir; /* saved files directory */ diff --git a/src/tet3/tcclib/lockfile.c b/src/tet3/tcclib/lockfile.c index c7e16482..0d4d8f48 100644 --- a/src/tet3/tcclib/lockfile.c +++ b/src/tet3/tcclib/lockfile.c @@ -52,11 +52,6 @@ MODIFICATIONS: #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* lock file mode */ #define MODEANY \ ((mode_t) (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) diff --git a/src/tet3/tcclib/lsdir.c b/src/tet3/tcclib/lsdir.c index fc8aaf33..6d698ea8 100644 --- a/src/tet3/tcclib/lsdir.c +++ b/src/tet3/tcclib/lsdir.c @@ -60,11 +60,6 @@ MODIFICATIONS: #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tcf_lsdir() - return a pointer to a list of pointers to directory ** entries diff --git a/src/tet3/tcclib/lsdir.c.orig b/src/tet3/tcclib/lsdir.c.orig index 38282523..c1e9b09b 100644 --- a/src/tet3/tcclib/lsdir.c.orig +++ b/src/tet3/tcclib/lsdir.c.orig @@ -51,11 +51,6 @@ MODIFICATIONS: #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tcf_lsdir() - return a pointer to a list of pointers to directory entries ** diff --git a/src/tet3/tcclib/mktmpdir.c b/src/tet3/tcclib/mktmpdir.c index 16be5696..f5db0e8b 100644 --- a/src/tet3/tcclib/mktmpdir.c +++ b/src/tet3/tcclib/mktmpdir.c @@ -57,10 +57,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* mode for created directory */ #define MODEANY ((mode_t) (S_IRWXU | S_IRWXG | S_IRWXO)) diff --git a/src/tet3/tcclib/procdir.c b/src/tet3/tcclib/procdir.c index 1892dc44..0c88294b 100644 --- a/src/tet3/tcclib/procdir.c +++ b/src/tet3/tcclib/procdir.c @@ -66,11 +66,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcclib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int copydir PROTOLIST((char *, char *, int)); static int copyfile PROTOLIST((char *, char *, struct STAT_ST *, int)); diff --git a/src/tet3/tcclib/rmrf.c b/src/tet3/tcclib/rmrf.c index bcfde2dc..a205bba4 100644 --- a/src/tet3/tcclib/rmrf.c +++ b/src/tet3/tcclib/rmrf.c @@ -63,11 +63,6 @@ MODIFICATIONS: #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** tcf_rmrf() - emulate an invocation of rm -rf ** diff --git a/src/tet3/tcclib/sharlock.c b/src/tet3/tcclib/sharlock.c index 5389bb42..3fb93e99 100644 --- a/src/tet3/tcclib/sharlock.c +++ b/src/tet3/tcclib/sharlock.c @@ -57,10 +57,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcclib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* creation modes for files and directories */ #define FILEMODE \ diff --git a/src/tet3/tcclib/tcfexec.c b/src/tet3/tcclib/tcfexec.c index cc6e76fb..a5285a7a 100644 --- a/src/tet3/tcclib/tcfexec.c +++ b/src/tet3/tcclib/tcfexec.c @@ -75,10 +75,6 @@ MODIFICATIONS: #define MODEANY \ ((mode_t) (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef TET_LITE /* -START-LITE-CUT- */ extern void tet_disconnect(); diff --git a/src/tet3/tcm/child.c b/src/tet3/tcm/child.c index 8ebce24a..bc08c713 100644 --- a/src/tet3/tcm/child.c +++ b/src/tet3/tcm/child.c @@ -85,11 +85,6 @@ MODIFICATIONS: #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* global variables, values inhereted from tet_exec() and tet_remexec() */ #ifdef TET_THREADS static int start_errno; diff --git a/src/tet3/tcm/dtcm.c b/src/tet3/tcm/dtcm.c index 20bdc0ed..35922fb6 100644 --- a/src/tet3/tcm/dtcm.c +++ b/src/tet3/tcm/dtcm.c @@ -168,11 +168,6 @@ MODIFICATIONS: #include "apilib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - #ifdef TET_LITE /* -LITE-CUT-LINE- */ # define TET_VERSION "3.3-lite" #else /* -START-LITE-CUT- */ diff --git a/src/tet3/tcm/ictp.c b/src/tet3/tcm/ictp.c index 93ebd208..1e81c169 100644 --- a/src/tet3/tcm/ictp.c +++ b/src/tet3/tcm/ictp.c @@ -148,10 +148,6 @@ MODIFICATIONS: #include "tet_jrnl.h" #include "apilib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #define MODE666 (mode_t) (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) #ifdef TET_LITE /* -LITE-CUT-LINE- */ diff --git a/src/tet3/tcm/tcm.c b/src/tet3/tcm/tcm.c index ff8ea3fa..257dd7ac 100644 --- a/src/tet3/tcm/tcm.c +++ b/src/tet3/tcm/tcm.c @@ -87,7 +87,7 @@ extern "C" { #include "sigsafe.h" extern int tet_tcm_main PROTOLIST((int, char **)); -extern void tet_dtcmerror PROTOLIST((int, char *, int, char *, char *)); +extern void tet_dtcmerror PROTOLIST((int, const char *, int, const char *, const char *)); TET_EXPORT char *tet_pname = "<unknown>"; TET_EXPORT int tet_thistest = 0; @@ -155,10 +155,6 @@ char **argv; extern "C" { #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcm_async() - do an automatic sync from the MTCM */ diff --git a/src/tet3/tcm/tcm.c.orig b/src/tet3/tcm/tcm.c.orig index cca62364..9094b5d4 100644 --- a/src/tet3/tcm/tcm.c.orig +++ b/src/tet3/tcm/tcm.c.orig @@ -148,10 +148,6 @@ char **argv; extern "C" { #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_tcm_async() - do an automatic sync from the MTCM */ diff --git a/src/tet3/tcm/tcm_bs.c b/src/tet3/tcm/tcm_bs.c index 0861ce64..8e0835f7 100644 --- a/src/tet3/tcm/tcm_bs.c +++ b/src/tet3/tcm/tcm_bs.c @@ -59,10 +59,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tcmfuncs.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char reqerr[] = "unknown request code"; /* diff --git a/src/tet3/tcm/tcm_in.c b/src/tet3/tcm/tcm_in.c index ce68efae..7b52343f 100644 --- a/src/tet3/tcm/tcm_in.c +++ b/src/tet3/tcm/tcm_in.c @@ -76,10 +76,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static void storetsinfo PROTOLIST((char *, struct ptab **, int)); diff --git a/src/tet3/tcm/tcm_xt.c b/src/tet3/tcm/tcm_xt.c index 7b793ca5..80e2e862 100644 --- a/src/tet3/tcm/tcm_xt.c +++ b/src/tet3/tcm/tcm_xt.c @@ -63,11 +63,6 @@ MODIFICATIONS: #include "tsinfo_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* global variables */ TET_EXPORT int tet_tpi_mode = -1; /* transport provider mode */ TET_EXPORT char *tet_tpname = (char *) 0; diff --git a/src/tet3/tcm/tcmchild.c b/src/tet3/tcm/tcmchild.c index 9238f2b3..e949be8d 100644 --- a/src/tet3/tcm/tcmchild.c +++ b/src/tet3/tcm/tcmchild.c @@ -80,12 +80,9 @@ extern "C" { #include "dtetlib.h" #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - extern int tet_tcmc_main PROTOLIST((int, char **)); -extern void tet_dtcmerror PROTOLIST((int, char *, int, char *, char *)); +extern void tet_dtcmerror PROTOLIST((int, const char *, int, const char *, + const char *)); TET_EXPORT char *tet_pname = "<unknown>"; TET_EXPORT int tet_thistest = -1; diff --git a/src/tet3/tcm/tcmchild.c.orig b/src/tet3/tcm/tcmchild.c.orig index e7dce10d..b16b49e0 100644 --- a/src/tet3/tcm/tcmchild.c.orig +++ b/src/tet3/tcm/tcmchild.c.orig @@ -76,10 +76,6 @@ extern "C" { #include "dtetlib.h" #include "sigsafe.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; -#endif - extern int tet_tcmc_main PROTOLIST((int, char **)); extern void tet_dtcmerror PROTOLIST((int, char *, int, char *, char *)); diff --git a/src/tet3/tcm/tcmfuncs.c b/src/tet3/tcm/tcmfuncs.c index ce931a56..1f128d11 100644 --- a/src/tet3/tcm/tcmfuncs.c +++ b/src/tet3/tcm/tcmfuncs.c @@ -104,10 +104,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef TET_LITE /* -START-LITE-CUT- */ extern int tet_psysid; /* parent's system id */ #endif /* -END-LITE-CUT- */ @@ -359,10 +355,9 @@ char **argv; ** note that this function might be called recursively */ -void tet_dtcmerror(errnum, file, line, s1, s2) -int errnum, line; -char *file; -register char *s1, *s2; +void tet_dtcmerror(int errnum, const char *file, int line, + register const char *s1, + register const char *s2) { char msg[MAXPATH + 128]; register char *p = msg; diff --git a/src/tet3/tcm/tcmrem.c b/src/tet3/tcm/tcmrem.c index f2e1b7e3..caef4171 100644 --- a/src/tet3/tcm/tcmrem.c +++ b/src/tet3/tcm/tcmrem.c @@ -85,10 +85,6 @@ TET_EXPORT struct ptab *tet_sdptab, *tet_xdptab; TET_EXPORT sigset_t tet_blockable_sigs; -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** main() is the main program for processes started by tet_remexec(). ** It is simply a wrapper for tet_tcmc_main(). diff --git a/src/tet3/xresd/cfname.c b/src/tet3/xresd/cfname.c index 6e771ed9..4492765d 100644 --- a/src/tet3/xresd/cfname.c +++ b/src/tet3/xresd/cfname.c @@ -49,10 +49,6 @@ MODIFICATIONS: #include "xresd.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char *cfname[XD_NCFNAME]; /* the stored config file names */ diff --git a/src/tet3/xresd/codesfile.c b/src/tet3/xresd/codesfile.c index afdd961c..f7bab225 100644 --- a/src/tet3/xresd/codesfile.c +++ b/src/tet3/xresd/codesfile.c @@ -52,10 +52,6 @@ MODIFICATIONS: #include "xresd.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char *codesfile; /* the stored config file name */ diff --git a/src/tet3/xresd/fake.c b/src/tet3/xresd/fake.c index e7c893cb..1652f1e4 100644 --- a/src/tet3/xresd/fake.c +++ b/src/tet3/xresd/fake.c @@ -43,10 +43,6 @@ MODIFICATIONS: #include "xresd.h" #include "server.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ss_timeout() - server-specific timeout processing ** diff --git a/src/tet3/xresd/tfproc.c b/src/tet3/xresd/tfproc.c index 83898762..6b9bff60 100644 --- a/src/tet3/xresd/tfproc.c +++ b/src/tet3/xresd/tfproc.c @@ -63,11 +63,6 @@ MODIFICATIONS: #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - - /* ** Transfer file table. ** diff --git a/src/tet3/xresd/xresd.c b/src/tet3/xresd/xresd.c index 1f96415f..bf4d472b 100644 --- a/src/tet3/xresd/xresd.c +++ b/src/tet3/xresd/xresd.c @@ -81,10 +81,6 @@ MODIFICATIONS: char *Tet_savedir; /* saved files directory */ -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /************************************************************************ ** * diff --git a/src/tet3/xresd/xresd_bs.c b/src/tet3/xresd/xresd_bs.c index 0e6529cd..43494bcc 100644 --- a/src/tet3/xresd/xresd_bs.c +++ b/src/tet3/xresd/xresd_bs.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "server_bs.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static char reqerr[] = "unknown request code"; /* diff --git a/src/tet3/xresd/xresd_in.c b/src/tet3/xresd/xresd_in.c index eddff7cb..52b4669a 100644 --- a/src/tet3/xresd/xresd_in.c +++ b/src/tet3/xresd/xresd_in.c @@ -49,10 +49,6 @@ MODIFICATIONS: #include "server_in.h" #include "inetlib_in.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* socket on which to listen */ SOCKET tet_listen_sd = 0; diff --git a/src/tet3/xresd/xresd_xt.c b/src/tet3/xresd/xresd_xt.c index b65e61ee..e0ba821e 100644 --- a/src/tet3/xresd/xresd_xt.c +++ b/src/tet3/xresd/xresd_xt.c @@ -55,10 +55,6 @@ MODIFICATIONS: #include "server_xt.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - struct t_call *tet_calls[MAX_CONN_IND]; /* to hold connection indications */ int tet_listen_fd = 0; /* descriptor on which to listen */ char *tet_tpname = (char *) 0; /* Transport provider name */ diff --git a/src/tet3/xresd/xresproc.c b/src/tet3/xresd/xresproc.c index 0fcc8c33..353a99aa 100644 --- a/src/tet3/xresd/xresproc.c +++ b/src/tet3/xresd/xresproc.c @@ -90,10 +90,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "tet_jrnl.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* static function declarations */ static int op_xr2 PROTOLIST((struct ptab *, struct xtab *)); diff --git a/src/tet3/xresd/xtab.c b/src/tet3/xresd/xtab.c index b9b8b586..6bb61f3b 100644 --- a/src/tet3/xresd/xtab.c +++ b/src/tet3/xresd/xtab.c @@ -56,10 +56,6 @@ MODIFICATIONS: #include "dtetlib.h" #include "xresd.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct xtab *xtab; /* ptr to head of xres table */ diff --git a/src/tet3/xtilib/accept.c b/src/tet3/xtilib/accept.c index 3d9f90dc..cc4c5a0a 100644 --- a/src/tet3/xtilib/accept.c +++ b/src/tet3/xtilib/accept.c @@ -64,10 +64,6 @@ MODIFICATIONS: #include "server_xt.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_accept() - accept a new connection on a listening file diff --git a/src/tet3/xtilib/connect.c b/src/tet3/xtilib/connect.c index c00cf289..7e27a00b 100644 --- a/src/tet3/xtilib/connect.c +++ b/src/tet3/xtilib/connect.c @@ -64,10 +64,6 @@ MODIFICATIONS: #include "server_xt.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_connect() - make a connection to a remote process */ diff --git a/src/tet3/xtilib/inetoul.c b/src/tet3/xtilib/inetoul.c index b78e54bb..b1576434 100644 --- a/src/tet3/xtilib/inetoul.c +++ b/src/tet3/xtilib/inetoul.c @@ -49,10 +49,6 @@ MODIFICATIONS: #define N_PARTS 4 -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - unsigned long tet_inetoul(cp) register char *cp; { diff --git a/src/tet3/xtilib/listn.c b/src/tet3/xtilib/listn.c index 2477d59b..1abbad85 100644 --- a/src/tet3/xtilib/listn.c +++ b/src/tet3/xtilib/listn.c @@ -47,10 +47,6 @@ MODIFICATIONS: #include "ltoa.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_listen() - clear the connection indication array prior to diff --git a/src/tet3/xtilib/nbio.c b/src/tet3/xtilib/nbio.c index 3b4da00a..f18b44e8 100644 --- a/src/tet3/xtilib/nbio.c +++ b/src/tet3/xtilib/nbio.c @@ -54,10 +54,6 @@ MODIFICATIONS: #include "error.h" #include "ltoa.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_nbio() - establish non-blocking i/o on an XTI fd ** diff --git a/src/tet3/xtilib/poll.c b/src/tet3/xtilib/poll.c index bc34e9a8..f40cd268 100644 --- a/src/tet3/xtilib/poll.c +++ b/src/tet3/xtilib/poll.c @@ -81,11 +81,6 @@ MODIFICATIONS: #include "server_xt.h" #include "tslib.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* declarations for static functions */ static int doaccept PROTOLIST((void)); #ifndef SVID3_POLL diff --git a/src/tet3/xtilib/rdwr.c b/src/tet3/xtilib/rdwr.c index 9b48e96c..fb390e00 100644 --- a/src/tet3/xtilib/rdwr.c +++ b/src/tet3/xtilib/rdwr.c @@ -59,10 +59,6 @@ MODIFICATIONS: #include "server_bs.h" #include "xtilib_xt.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - #ifndef NOTRACE static char msghdr[] = "message header"; static char msgdata[] = "message data"; diff --git a/src/tet3/xtilib/tccdaddr.c b/src/tet3/xtilib/tccdaddr.c index e6eae33e..a40f507a 100644 --- a/src/tet3/xtilib/tccdaddr.c +++ b/src/tet3/xtilib/tccdaddr.c @@ -54,11 +54,6 @@ MODIFICATIONS: #include "ltoa.h" #include "xtilib_xt.h" - -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_gettccdaddr() - look up the XTI address for a TCCD ** and store it in the related tptab entry diff --git a/src/tet3/xtilib/tptab.c b/src/tet3/xtilib/tptab.c index 262c70f4..4b862822 100644 --- a/src/tet3/xtilib/tptab.c +++ b/src/tet3/xtilib/tptab.c @@ -53,10 +53,6 @@ MODIFICATIONS: #include "ltoa.h" #endif -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - /* ** tet_ts_ptalloc() - allocate transport-specific data element in a ptab diff --git a/src/tet3/xtilib/tsinfo.c b/src/tet3/xtilib/tsinfo.c index 1fe44ebf..a326f049 100644 --- a/src/tet3/xtilib/tsinfo.c +++ b/src/tet3/xtilib/tsinfo.c @@ -51,10 +51,6 @@ MODIFICATIONS: #include "tsinfo_xt.h" #include "dtetlib.h" -#ifdef NEEDsrcFile -static char srcFile[] = __FILE__; /* file name for error reporting */ -#endif - static struct stdesc *st = (struct stdesc *)0; #ifdef TCPTPI static struct stdesc st_in[] = { diff --git a/src/tet3/xtilib/xtierror.c b/src/tet3/xtilib/xtierror.c index fb134fcd..31c15384 100644 --- a/src/tet3/xtilib/xtierror.c +++ b/src/tet3/xtilib/xtierror.c @@ -64,11 +64,10 @@ MODIFICATIONS: ** tet_xtierror() - XTI/TLI generic error handler */ -void tet_xtierror(errnum, file, line, s1, s2) -int errnum, line; -char *file, *s1, *s2; +void tet_xtierror(int errnum, const char *file, int line, const char *s1, + const char *s2) { - char *s3; + const char *s3; int save_errno = errno; (void) fprintf(stderr, "%s (%s, %d): %s", @@ -98,9 +97,8 @@ char *file, *s1, *s2; /* ** tet_xtifatal - XTI/TLI generic fatal error handler */ -void tet_xtifatal(errnum, file, line, s1, s2) -int errnum, line; -char *file, *s1, *s2; +void tet_xtifatal(int errnum, const char *file, int line, const char *s1, + const char *s2) { tet_xtierror(errnum, file, line, s1, s2); exit(1); |