1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fixes for warnings related to -Wimplicit-int.

This commit is contained in:
Jose Rubio 2019-08-20 12:52:43 +02:00
parent 0d115796c2
commit f0c312b207
108 changed files with 177 additions and 177 deletions

View file

@ -435,7 +435,7 @@ $1"
?*) z=$lib ?*) z=$lib
e= e=
lib= lib=
echo "main(){return(0);}" > $tmp.c echo "int main(){return(0);}" > $tmp.c
for x in $z for x in $z
do case $x in do case $x in
-) case $lib in -) case $lib in
@ -854,7 +854,7 @@ extern int $v;
#endif" #endif"
;; ;;
esac esac
echo "main(){char* i = (char*)&$v; return i!=0;}" echo "int main(){char* i = (char*)&$v; return i!=0;}"
} > $tmp.c } > $tmp.c
$cc -c $tmp.c <&$nullin >&$nullout && $cc -c $tmp.c <&$nullin >&$nullout &&
rm -f $tmp.exe rm -f $tmp.exe
@ -1109,7 +1109,7 @@ static struct xxx v;
struct xxx* f() { return &v; }" struct xxx* f() { return &v; }"
;; ;;
esac esac
echo "main() { f(); return 0; }" echo "int main() { f(); return 0; }"
} > $tmp.c } > $tmp.c
rm -f $tmp.exe rm -f $tmp.exe
if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout &&

View file

@ -584,7 +584,7 @@ do case $in in
?*) z=$lib ?*) z=$lib
e= e=
lib= lib=
echo "main(){return(0);}" > $tmp.c echo "int main(){return(0);}" > $tmp.c
for x in $z for x in $z
do case $x in do case $x in
-) case $lib in -) case $lib in
@ -947,13 +947,13 @@ $usr
_BEGIN_EXTERNS_ _BEGIN_EXTERNS_
extern int $statictest; extern int $statictest;
_END_EXTERNS_ _END_EXTERNS_
main(){char* i = (char*)&$statictest; return i!=0;}" > $tmp.c int main(){char* i = (char*)&$statictest; return i!=0;}" > $tmp.c
rm -f $tmp.exe rm -f $tmp.exe
if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe
then case $static in then case $static in
.) static= .) static=
echo '#include <stdio.h> echo '#include <stdio.h>
main(){printf("hello");return(0);}' > $tmp.c int main(){printf("hello");return(0);}' > $tmp.c
rm -f $tmp.exe rm -f $tmp.exe
if $cc -c $tmp.c <&$nullin >&$nullout && $cc -o $tmp.exe $tmp.o <&$nullin >&$nullout 2>$tmp.e && $executable $tmp.exe if $cc -c $tmp.c <&$nullin >&$nullout && $cc -o $tmp.exe $tmp.o <&$nullin >&$nullout 2>$tmp.e && $executable $tmp.exe
then e=`wc -l $tmp.e` then e=`wc -l $tmp.e`
@ -1038,7 +1038,7 @@ extern int $v;
_END_EXTERNS_" _END_EXTERNS_"
;; ;;
esac esac
echo "main(){char* i = (char*)&$v; return i!=0;}" echo "int main(){char* i = (char*)&$v; return i!=0;}"
} > $tmp.c } > $tmp.c
$cc -c $tmp.c <&$nullin >&$nullout && $cc -c $tmp.c <&$nullin >&$nullout &&
rm -f $tmp.exe rm -f $tmp.exe
@ -1145,7 +1145,7 @@ $inc
_BEGIN_EXTERNS_ _BEGIN_EXTERNS_
extern int $v(); extern int $v();
_END_EXTERNS_ _END_EXTERNS_
static int ((*i)())=$v;main(){return(i==0);}" > $tmp.c static int ((*i)())=$v;int main(){return(i==0);}" > $tmp.c
$cc -c $tmp.c <&$nullin >&$nullout && $cc -c $tmp.c <&$nullin >&$nullout &&
rm -f $tmp.exe rm -f $tmp.exe
if $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe if $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe
@ -1389,7 +1389,7 @@ static struct xxx v;
struct xxx* f() { return &v; }" struct xxx* f() { return &v; }"
;; ;;
esac esac
echo "main() { f(); return 0; }" echo "int main() { f(); return 0; }"
} > $tmp.c } > $tmp.c
rm -f $tmp.exe rm -f $tmp.exe
if $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && if $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout &&

View file

@ -262,7 +262,7 @@ $INSTALLROOT/bin/cc)
;; ;;
*) _ship_probe_PATH=$PATH *) _ship_probe_PATH=$PATH
case $CC in case $CC in
"") echo 'main() { return 0; }' > ${_tmp_}0.c "") echo 'int main() { return 0; }' > ${_tmp_}0.c
cat > $_tmp_.c <<'!' cat > $_tmp_.c <<'!'
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
@ -383,7 +383,7 @@ glue(i, nt)
#else #else
int int
#endif #endif
main(int argc, char** argv) { return 0; } int main(int argc, char** argv) { return 0; }
#endif #endif
" > $_tmp_.c " > $_tmp_.c
if $CC $CCFLAGS -c $_tmp_.c >/dev/null 2>&1 if $CC $CCFLAGS -c $_tmp_.c >/dev/null 2>&1
@ -400,7 +400,7 @@ main(int argc, char** argv) { return 0; }
echo "#include <sys/types.h> echo "#include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
main() { return socket(0, 0, 0); }" > $_tmp_.c int main() { return socket(0, 0, 0); }" > $_tmp_.c
for i in "" "-systype bsd43" for i in "" "-systype bsd43"
do if $CC $CCFLAGS $i -o $_tmp_.exe $_tmp_.c >/dev/null 2>&1 do if $CC $CCFLAGS $i -o $_tmp_.exe $_tmp_.c >/dev/null 2>&1
then case $i in then case $i in
@ -1308,13 +1308,13 @@ case $_read_ in
eval `( eval `(
mkdir /tmp/mam$$ mkdir /tmp/mam$$
cd /tmp/mam$$ cd /tmp/mam$$
echo 'main(){return 0;}' > main.c echo 'int main(){return 0;}' > main.c
if $CC -c main.c >/dev/null 2>&1 if $CC -c main.c >/dev/null 2>&1
then if $CC -L. main.o -lc >/dev/null 2>&1 then if $CC -L. main.o -lc >/dev/null 2>&1
then $CC -L. main.o -lc > libc.a >/dev/null 2>&1 || echo "mam_cc_L=' '" then $CC -L. main.o -lc > libc.a >/dev/null 2>&1 || echo "mam_cc_L=' '"
fi fi
fi fi
echo "int f(){return(0);} main(){return(f());}" > pic.c echo "int f(){return(0);} int main(){return(f());}" > pic.c
if $CC -c pic.c >/dev/null 2>e if $CC -c pic.c >/dev/null 2>e
then e=\`wc -l e\` then e=\`wc -l e\`
s=\`wc pic.o\` s=\`wc pic.o\`

View file

@ -260,8 +260,7 @@ static struct optab ops[] =
"xap", shipxap, "xap", shipxap,
}; };
int int main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
char* s; char* s;
int i; int i;

View file

@ -4929,8 +4929,7 @@ proto __PARAM__((char* file, char* notice, int flags), (file, notice, flags)) __
return(flags); return(flags);
} }
int int main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
char* b; char* b;
char* file; char* file;
int fd; int fd;

View file

@ -41,12 +41,12 @@ make sh/main.c
make FEATURE/externs implicit make FEATURE/externs implicit
make features/externs make features/externs
done features/externs done features/externs
setv mam_libm `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lm >/dev/null 2>&1 && echo ' -lm'; rm -f x.${!-$$}.[cox])` setv mam_libm `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lm >/dev/null 2>&1 && echo ' -lm'; rm -f x.${!-$$}.[cox])`
setv mam_libjobs `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ljobs >/dev/null 2>&1 && echo ' -ljobs'; rm -f x.${!-$$}.[cox])` setv mam_libjobs `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ljobs >/dev/null 2>&1 && echo ' -ljobs'; rm -f x.${!-$$}.[cox])`
setv mam_libi `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -li >/dev/null 2>&1 && echo ' -li'; rm -f x.${!-$$}.[cox])` setv mam_libi `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -li >/dev/null 2>&1 && echo ' -li'; rm -f x.${!-$$}.[cox])`
setv mam_libdl `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldl >/dev/null 2>&1 && echo ' -ldl'; rm -f x.${!-$$}.[cox])` setv mam_libdl `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldl >/dev/null 2>&1 && echo ' -ldl'; rm -f x.${!-$$}.[cox])`
setv mam_libdld `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldld >/dev/null 2>&1 && echo ' -ldld'; rm -f x.${!-$$}.[cox])` setv mam_libdld `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldld >/dev/null 2>&1 && echo ' -ldld'; rm -f x.${!-$$}.[cox])`
setv mam_libintl `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lintl >/dev/null 2>&1 && echo ' -lintl'; rm -f x.${!-$$}.[cox])` setv mam_libintl `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lintl >/dev/null 2>&1 && echo ' -lintl'; rm -f x.${!-$$}.[cox])`
setv mam_libast ${mam_cc_L+-last}${mam_cc_L-${INSTALLROOT}/lib/libast.a} setv mam_libast ${mam_cc_L+-last}${mam_cc_L-${INSTALLROOT}/lib/libast.a}
exec - iffe set cc ${CC} ${ICCFLAGS} ${LDFLAGS} : ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} ${mam_cc_static} ${mam_libm} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libjobs} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libi} ${mam_cc_dynamic} ${mam_libdl} ${mam_libdld} ${mam_cc_static} ${mam_libintl} ${mam_cc_dynamic} ${mam_libast} : run features/externs exec - iffe set cc ${CC} ${ICCFLAGS} ${LDFLAGS} : ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} ${mam_cc_static} ${mam_libm} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libjobs} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libi} ${mam_cc_dynamic} ${mam_libdl} ${mam_libdld} ${mam_cc_static} ${mam_libintl} ${mam_cc_dynamic} ${mam_libast} : run features/externs
done FEATURE/externs generated done FEATURE/externs generated

View file

@ -242,7 +242,7 @@ static char *nxtarg __PARAM__((int mt), (mt)) __OTORP__(int mt;){
} }
static e3 __PARAM__((void), ()){ static int e3 __PARAM__((void), ()){
char *arg, *cp; char *arg, *cp;
int op; int op;
char *binop; char *binop;
@ -419,7 +419,7 @@ int test_unop __PARAM__((int op,const char *arg), (op, arg)) __OTORP__(int op;co
} }
} }
test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){ int test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){
double lnum,rnum; double lnum,rnum;
if(op&TEST_ARITH) if(op&TEST_ARITH)
{ {
@ -484,7 +484,7 @@ static time_t test_time __PARAM__((const char *file1,const char *file2), (file1,
* return true if inode of two files are the same * return true if inode of two files are the same
*/ */
test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OTORP__(const char *file1;const char *file2;){ int test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OTORP__(const char *file1;const char *file2;){
struct stat stat1,stat2; struct stat stat1,stat2;
if(test_stat(file1,&stat1)>=0 && test_stat(file2,&stat2)>=0) if(test_stat(file1,&stat1)>=0 && test_stat(file2,&stat2)>=0)
if(stat1.st_dev == stat2.st_dev && stat1.st_ino == stat2.st_ino) if(stat1.st_dev == stat2.st_dev && stat1.st_ino == stat2.st_ino)
@ -498,7 +498,7 @@ test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OT
* The static buffer statb is shared with test_mode. * The static buffer statb is shared with test_mode.
*/ */
sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){ int sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
if(*name==0) if(*name==0)
return(-1); return(-1);
if(strmatch(name,(char*)e_devfdNN)) if(strmatch(name,(char*)e_devfdNN))

View file

@ -127,7 +127,7 @@ static char *overlay __PARAM__((char *str,const char *newstr), (str, newstr)) __
* mode is '=' cause files to be listed in select format * mode is '=' cause files to be listed in select format
*/ */
ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, eol, mode)) __OTORP__(char outbuff[];int *cur;int *eol;int mode;){ int ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, eol, mode)) __OTORP__(char outbuff[];int *cur;int *eol;int mode;){
int offset = staktell(); int offset = staktell();
char *staksav = stakptr(0); char *staksav = stakptr(0);
struct comnod *comptr = (struct comnod*)stakalloc(sizeof(struct comnod)); struct comnod *comptr = (struct comnod*)stakalloc(sizeof(struct comnod));
@ -335,7 +335,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
* look for edit macro named _i * look for edit macro named _i
* if found, puts the macro definition into lookahead buffer and returns 1 * if found, puts the macro definition into lookahead buffer and returns 1
*/ */
ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){ int ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
char *out; char *out;
Namval_t *np; Namval_t *np;
genchar buff[LOOKAHEAD+1]; genchar buff[LOOKAHEAD+1];
@ -368,7 +368,7 @@ ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
/* /*
* Enter the fc command on the current history line * Enter the fc command on the current history line
*/ */
ed_fulledit __PARAM__((void), ()){ int ed_fulledit __PARAM__((void), ()){
char *cp; char *cp;
if(!sh.hist_ptr) if(!sh.hist_ptr)
return(-1); return(-1);

View file

@ -274,7 +274,7 @@ void tty_cooked __PARAM__((int fd), (fd)) __OTORP__(int fd;){
* *
}*/ }*/
tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){ int tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){
#ifdef L_MASK #ifdef L_MASK
struct ltchars lchars; struct ltchars lchars;
#endif /* L_MASK */ #endif /* L_MASK */
@ -431,7 +431,7 @@ tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
# define IEXTEN 0 # define IEXTEN 0
# endif /* IEXTEN */ # endif /* IEXTEN */
tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){ int tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
switch(editb.e_raw) switch(editb.e_raw)
{ {
case ECHOMODE: case ECHOMODE:
@ -933,7 +933,7 @@ void ed_putchar __PARAM__((int c), (c)) __OTORP__(int c;){
* copy virtual to physical and return the index for cursor in physical buffer * copy virtual to physical and return the index for cursor in physical buffer
*/ */
ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){ int ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){
genchar *sp = virt; genchar *sp = virt;
genchar *dp = phys; genchar *dp = phys;
int c; int c;
@ -1107,7 +1107,7 @@ int ed_genlen __PARAM__((const genchar *str), (str)) __OTORP__(const genchar *st
* returns 1 if string in not in this format, 0 otherwise. * returns 1 if string in not in this format, 0 otherwise.
*/ */
ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ int ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
int indx = 0; int indx = 0;
int state = 0; int state = 0;
int c; int c;

View file

@ -189,7 +189,7 @@ static void xcommands __PROTO__((int));
static int cr_ok; static int cr_ok;
static Histloc_t location = { -5, 0 }; static Histloc_t location = { -5, 0 };
ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){ int ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){
int c; int c;
int i; int i;
genchar *out; genchar *out;

View file

@ -247,7 +247,7 @@ static int textmod __PROTO__((int,int));
* *
-*/ -*/
ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){ int ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){
int i; /* general variable */ int i; /* general variable */
int term_char; /* read() termination character */ int term_char; /* read() termination character */
char prompt[PRSIZE+2]; /* prompt */ char prompt[PRSIZE+2]; /* prompt */

View file

@ -16,23 +16,23 @@ SHELL=/bin/sh
YACCFLAGS=-d YACCFLAGS=-d
mam_libast=$${mam_cc_L+-last}$${mam_cc_L-${PACKAGE_ast_LIB}/libast.a} mam_libast=$${mam_cc_L+-last}$${mam_cc_L-${PACKAGE_ast_LIB}/libast.a}
LPR=lpr LPR=lpr
mam_libdl=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libdl=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldl \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldl \
>/dev/null 2>&1 && echo ' -ldl'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -ldl'; rm -f x.$${!-$$$$}.[cox])`
mam_libjobs=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libjobs=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ljobs \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ljobs \
>/dev/null 2>&1 && echo ' -ljobs'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -ljobs'; rm -f x.$${!-$$$$}.[cox])`
COTEMP=$$$$ COTEMP=$$$$
mam_libintl=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libintl=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lintl \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lintl \
>/dev/null 2>&1 && echo ' -lintl'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -lintl'; rm -f x.$${!-$$$$}.[cox])`
mam_libi=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libi=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -li \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -li \
>/dev/null 2>&1 && echo ' -li'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -li'; rm -f x.$${!-$$$$}.[cox])`
PACKAGE_ast=${INSTALLROOT} PACKAGE_ast=${INSTALLROOT}
CPP=${CC} -E CPP=${CC} -E
PR=pr PR=pr
mam_libm=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libm=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lm \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lm \
>/dev/null 2>&1 && echo ' -lm'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -lm'; rm -f x.$${!-$$$$}.[cox])`
INSTALLROOT=../../.. INSTALLROOT=../../..
@ -43,7 +43,7 @@ PACKAGE_ast_LIB=${PACKAGE_ast}/lib
AR=ar AR=ar
AS=as AS=as
TAR=tar TAR=tar
mam_libdld=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \ mam_libdld=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldld \ ${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldld \
>/dev/null 2>&1 && echo ' -ldld'; rm -f x.$${!-$$$$}.[cox])` >/dev/null 2>&1 && echo ' -ldld'; rm -f x.$${!-$$$$}.[cox])`
CPIO=cpio CPIO=cpio

View file

@ -830,7 +830,7 @@ void sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){
* returns -1 for failure, 0 for success * returns -1 for failure, 0 for success
* <mode> is the same as for access() * <mode> is the same as for access()
*/ */
sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){ int sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){
int flags; int flags;
if(mode==X_OK) if(mode==X_OK)
return(-1); return(-1);

View file

@ -1230,7 +1230,7 @@ done:
* disown job if bgflag == 'd' * disown job if bgflag == 'd'
*/ */
job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){ int job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){
const char *msg; const char *msg;
if(!pw || !(pw=job_byjid((int)pw->p_job))) if(!pw || !(pw=job_byjid((int)pw->p_job)))
return(1); return(1);

View file

@ -140,7 +140,7 @@ static char beenhere = 0;
} }
#endif /* _lib_sigvec */ #endif /* _lib_sigvec */
main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){ int main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){
char *name; char *name;
int fdin; int fdin;
Sfio_t *iop; Sfio_t *iop;

View file

@ -102,7 +102,7 @@
static const char id[] = "\n@(#)shcomp (AT&T Bell Laboratories) 12/28/93\0\n"; static const char id[] = "\n@(#)shcomp (AT&T Bell Laboratories) 12/28/93\0\n";
static const char header[6] = { CNTL('k'),CNTL('s'),CNTL('h'),0,VERSION,0 }; static const char header[6] = { CNTL('k'),CNTL('s'),CNTL('h'),0,VERSION,0 };
main __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ int main __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
Sfio_t *in, *out; Sfio_t *in, *out;
union anynode *t; union anynode *t;
char *cp; char *cp;

View file

@ -129,7 +129,7 @@ static gid_t rgroupid;
static gid_t egroupid; static gid_t egroupid;
static struct stat statb; static struct stat statb;
main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ int main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
int m,n; int m,n;
char *p; char *p;
struct stat statx; struct stat statx;
@ -316,7 +316,7 @@ static void error_exit __PARAM__((const char *message), (message)) __OTORP__(con
* This version of access checks against effective uid and effective gid * This version of access checks against effective uid and effective gid
*/ */
eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){ int eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
struct stat statb; struct stat statb;
if (stat(name, &statb) == 0) if (stat(name, &statb) == 0)
{ {
@ -367,7 +367,7 @@ eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const ch
} }
#ifdef _lib_setreuid #ifdef _lib_setreuid
setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__(int mode;int owner;int group;){ int setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__(int mode;int owner;int group;){
if(mode & S_ISGID) if(mode & S_ISGID)
setregid(rgroupid,group); setregid(rgroupid,group);

View file

@ -209,7 +209,7 @@ static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv,
} }
#endif /* SHOPT_FASTPIPE */ #endif /* SHOPT_FASTPIPE */
sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){ int sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){
sh_sigcheck(); sh_sigcheck();
if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC)) if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC))
{ {
@ -1220,7 +1220,7 @@ sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(con
* returns 1 if r == trim(s) otherwise 0 * returns 1 if r == trim(s) otherwise 0
*/ */
static trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){ static int trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){
char c; char c;
while(c = *s++) while(c = *s++)
{ {

View file

@ -402,6 +402,7 @@ nocom __PARAM__((Sfio_t* sp, char* file), (sp, file)) __OTORP__(Sfio_t* sp; char
/*NOTREACHED*/ /*NOTREACHED*/
} }
int
main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
int c; int c;
char* s; char* s;

View file

@ -125,7 +125,7 @@ fi
mkdir suffix mkdir suffix
cd suffix cd suffix
for src in $probe_src for src in $probe_src
do echo "main(){return 0;}" > ../test.$src do echo "int main(){return 0;}" > ../test.$src
rm -f test* rm -f test*
if $cc -c ../test.$src if $cc -c ../test.$src
then set test.* then set test.*
@ -157,7 +157,7 @@ cd ..
case $src in case $src in
c) ;; c) ;;
*) echo '// ( *) echo '// (
main() int main()
{ {
class { public: int i; } j; class { public: int i; } j;
j.i = 0; j.i = 0;
@ -217,7 +217,7 @@ do shift
done done
echo '#include <stdio.h> echo '#include <stdio.h>
main(){printf("hello");return(0);}' > dynamic.$src int main(){printf("hello");return(0);}' > dynamic.$src
if $cc -c dynamic.$src if $cc -c dynamic.$src
then eval set x $probe_so then eval set x $probe_so
while : while :
@ -297,7 +297,7 @@ then eval set x $probe_so
fi fi
fi fi
echo 'main(){return(0);}' > hosted.$src echo 'int main(){return(0);}' > hosted.$src
$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1 $cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1
cp /bin/echo cpp cp /bin/echo cpp

View file

@ -129,7 +129,7 @@ done
case $src in case $src in
c) ;; c) ;;
*) echo '#include <iostream.h> *) echo '#include <iostream.h>
main() int main()
{ {
cout << "hello world"; cout << "hello world";
return 0; return 0;
@ -168,7 +168,7 @@ do shift
done done
echo '#include <stdio.h> echo '#include <stdio.h>
main(){printf("hello");return(0);}' > dynamic.$src int main(){printf("hello");return(0);}' > dynamic.$src
if $cc -c dynamic.$src if $cc -c dynamic.$src
then eval set x $probe_so then eval set x $probe_so
while : while :
@ -234,7 +234,7 @@ then eval set x $probe_so
fi fi
fi fi
echo 'main(){return(0);}' > hosted.$src echo 'int main(){return(0);}' > hosted.$src
$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1 $cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1
cp /bin/echo cpp cp /bin/echo cpp

View file

@ -116,7 +116,7 @@ struct _s_
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int i; int i;
int j; int j;

View file

@ -106,7 +106,7 @@
extern __MANGLE__ int getgroups __PROTO__((int, gid_t*)); extern __MANGLE__ int getgroups __PROTO__((int, gid_t*));
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
#if _lib_getgroups #if _lib_getgroups
if (sizeof(gid_t) < sizeof(int)) if (sizeof(gid_t) < sizeof(int))

View file

@ -116,7 +116,7 @@
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int f_local = 0; int f_local = 0;
int f_lck = 0; int f_lck = 0;

View file

@ -130,7 +130,7 @@ static struct
static int size[] = { 1, 2, 4, 8 }; static int size[] = { 1, 2, 4, 8 };
main() int main()
{ {
int t; int t;
int s; int s;

View file

@ -152,7 +152,7 @@ static char* cmd[] = { "/bin/echo", 0 };
#define child() spawnve(cmd[0],cmd,(char**)0) #define child() spawnve(cmd[0],cmd,(char**)0)
#endif #endif
main() int main()
{ {
int i; int i;
int n; int n;

View file

@ -105,7 +105,7 @@
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int n; int n;
int idperm; int idperm;

View file

@ -256,7 +256,7 @@ static int index[64];
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int i; int i;
int j; int j;

View file

@ -131,7 +131,7 @@ __STDPP__directive pragma pp:nohide printf
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
#endif #endif
main() int main()
{ {
int sep = 0; int sep = 0;
long val; long val;

View file

@ -108,7 +108,7 @@ struct _s_
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int i; int i;
int j; int j;

View file

@ -98,7 +98,7 @@
extern __MANGLE__ int getgroups __PROTO__((int, gid_t*)); extern __MANGLE__ int getgroups __PROTO__((int, gid_t*));
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
#if _lib_getgroups #if _lib_getgroups
if (sizeof(gid_t) < sizeof(int)) if (sizeof(gid_t) < sizeof(int))

View file

@ -107,7 +107,7 @@
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int f_local = 0; int f_local = 0;
int f_lck = 0; int f_lck = 0;

View file

@ -122,7 +122,7 @@ static struct
static int size[] = { 1, 2, 4, 8 }; static int size[] = { 1, 2, 4, 8 };
main() int main()
{ {
int t; int t;
int s; int s;

View file

@ -119,7 +119,7 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...));
#include "conflib.h" #include "conflib.h"
main() int main()
{ {
int i; int i;
int n; int n;

View file

@ -97,7 +97,7 @@
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int n; int n;
int idperm; int idperm;

View file

@ -278,7 +278,7 @@ static int index[64];
extern __MANGLE__ int printf __PROTO__((const char*, ...)); extern __MANGLE__ int printf __PROTO__((const char*, ...));
main() int main()
{ {
int i; int i;
int j; int j;

View file

@ -118,7 +118,7 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...));
#include "conflib.h" #include "conflib.h"
main() int main()
{ {
#include "confuni.h" #include "confuni.h"
return(0); return(0);

View file

@ -97,7 +97,7 @@
*/ */
int int
hashwalk __PARAM__((Hash_table_t* tab, int flags, register(*walker)(const char*, char*, __V_*), __V_* handle), (tab, flags, walker, handle)) __OTORP__(Hash_table_t* tab; int flags; register(*walker)(); __V_* handle;){ hashwalk __PARAM__((Hash_table_t* tab, int flags, int register(*walker)(const char*, char*, __V_*), __V_* handle), (tab, flags, walker, handle)) __OTORP__(Hash_table_t* tab; int flags; int register(*walker)(); __V_* handle;){
Hash_bucket_t* b; Hash_bucket_t* b;
int v; int v;
Hash_position_t* pos; Hash_position_t* pos;

View file

@ -416,6 +416,7 @@ static int resize __PARAM__((char** home, char** endbuf, char** path, char** bas
/* /*
The real thing. The real thing.
*/ */
int
ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comparf)(Ftw_t*, Ftw_t*)), (cpath, userf, flags, comparf)) __OTORP__(const char *cpath; int (*userf)(); int flags; int (*comparf)();){ ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comparf)(Ftw_t*, Ftw_t*)), (cpath, userf, flags, comparf)) __OTORP__(const char *cpath; int (*userf)(); int flags; int (*comparf)();){
char *path = (char*)cpath; char *path = (char*)cpath;
int cdrv; /* chdir value */ int cdrv; /* chdir value */

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfclrerr(reg Sfio_t* f) static int __sfclrerr(reg Sfio_t* f)
#else #else
static __sfclrerr(f) static __sfclrerr(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sfclrerr #undef sfclrerr
#if __STD_C #if __STD_C
sfclrerr(reg Sfio_t* f) int sfclrerr(reg Sfio_t* f)
#else #else
sfclrerr(f) sfclrerr(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfeof(reg Sfio_t* f) static int __sfeof(reg Sfio_t* f)
#else #else
static __sfeof(f) static __sfeof(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sfeof #undef sfeof
#if __STD_C #if __STD_C
sfeof(reg Sfio_t* f) int sfeof(reg Sfio_t* f)
#else #else
sfeof(f) sfeof(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sferror(reg Sfio_t* f) static int __sferror(reg Sfio_t* f)
#else #else
static __sferror(f) static __sferror(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sferror #undef sferror
#if __STD_C #if __STD_C
sferror(reg Sfio_t* f) int sferror(reg Sfio_t* f)
#else #else
sferror(f) sferror(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sffileno(reg Sfio_t* f) static int __sffileno(reg Sfio_t* f)
#else #else
static __sffileno(f) static __sffileno(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sffileno #undef sffileno
#if __STD_C #if __STD_C
sffileno(reg Sfio_t* f) int sffileno(reg Sfio_t* f)
#else #else
sffileno(f) sffileno(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfgetc(reg Sfio_t* f) static int __sfgetc(reg Sfio_t* f)
#else #else
static __sfgetc(f) static __sfgetc(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sfgetc #undef sfgetc
#if __STD_C #if __STD_C
sfgetc(reg Sfio_t* f) int sfgetc(reg Sfio_t* f)
#else #else
sfgetc(f) sfgetc(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfputc(reg Sfio_t* f, reg int c) static int __sfputc(reg Sfio_t* f, reg int c)
#else #else
static __sfputc(f,c) static __sfputc(f,c)
reg Sfio_t *f; reg Sfio_t *f;
@ -59,7 +59,7 @@ reg int c;
#undef sfputc #undef sfputc
#if __STD_C #if __STD_C
sfputc(reg Sfio_t* f, reg int c) int sfputc(reg Sfio_t* f, reg int c)
#else #else
sfputc(f,c) sfputc(f,c)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfputd(reg Sfio_t* f, reg double v) static int __sfputd(reg Sfio_t* f, reg double v)
#else #else
static __sfputd(f,v) static __sfputd(f,v)
reg Sfio_t *f; reg Sfio_t *f;
@ -59,7 +59,7 @@ reg double v;
#undef sfputd #undef sfputd
#if __STD_C #if __STD_C
sfputd(reg Sfio_t* f, reg double v) int sfputd(reg Sfio_t* f, reg double v)
#else #else
sfputd(f,v) sfputd(f,v)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfputl(reg Sfio_t* f, reg long v) static int __sfputl(reg Sfio_t* f, reg long v)
#else #else
static __sfputl(f,v) static __sfputl(f,v)
reg Sfio_t *f; reg Sfio_t *f;
@ -59,7 +59,7 @@ reg long v;
#undef sfputl #undef sfputl
#if __STD_C #if __STD_C
sfputl(reg Sfio_t* f, reg long v) int sfputl(reg Sfio_t* f, reg long v)
#else #else
sfputl(f,v) sfputl(f,v)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfputu(reg Sfio_t* f, reg ulong v) static int __sfputu(reg Sfio_t* f, reg ulong v)
#else #else
static __sfputu(f,v) static __sfputu(f,v)
reg Sfio_t *f; reg Sfio_t *f;
@ -59,7 +59,7 @@ reg ulong v;
#undef sfputu #undef sfputu
#if __STD_C #if __STD_C
sfputu(reg Sfio_t* f, reg ulong v) int sfputu(reg Sfio_t* f, reg ulong v)
#else #else
sfputu(f,v) sfputu(f,v)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfslen(void) static int __sfslen(void)
#else #else
static __sfslen() static __sfslen()
#endif #endif
@ -57,7 +57,7 @@ static __sfslen()
#undef sfslen #undef sfslen
#if __STD_C #if __STD_C
sfslen(void) int sfslen(void)
#else #else
sfslen() sfslen()
#endif #endif

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfstacked(reg Sfio_t* f) static int __sfstacked(reg Sfio_t* f)
#else #else
static __sfstacked(f) static __sfstacked(f)
reg Sfio_t *f; reg Sfio_t *f;
@ -58,7 +58,7 @@ reg Sfio_t *f;
#undef sfstacked #undef sfstacked
#if __STD_C #if __STD_C
sfstacked(reg Sfio_t* f) int sfstacked(reg Sfio_t* f)
#else #else
sfstacked(f) sfstacked(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
static __sfulen(reg ulong v) static int __sfulen(reg ulong v)
#else #else
static __sfulen(v) static __sfulen(v)
reg ulong v; reg ulong v;
@ -58,7 +58,7 @@ reg ulong v;
#undef sfulen #undef sfulen
#if __STD_C #if __STD_C
sfulen(reg ulong v) int sfulen(reg ulong v)
#else #else
sfulen(v) sfulen(v)
reg ulong v; reg ulong v;

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfclose(reg Sfio_t* f) int sfclose(reg Sfio_t* f)
#else #else
sfclose(f) sfclose(f)
reg Sfio_t* f; reg Sfio_t* f;

View file

@ -52,7 +52,7 @@
** Written by Kiem-Phong Vo (07/20/90). ** Written by Kiem-Phong Vo (07/20/90).
*/ */
#if __STD_C #if __STD_C
sfclrlock(reg Sfio_t* f) int sfclrlock(reg Sfio_t* f)
#else #else
sfclrlock(f) sfclrlock(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfdlen(reg double v) int sfdlen(reg double v)
#else #else
sfdlen(v) sfdlen(v)
reg double v; reg double v;

View file

@ -49,7 +49,7 @@
** Written by Kiem-Phong Vo (8/18/90) ** Written by Kiem-Phong Vo (8/18/90)
*/ */
#if __STD_C #if __STD_C
_sfexcept(reg Sfio_t* f, reg int type, reg int io, reg Sfdisc_t* disc) int _sfexcept(reg Sfio_t* f, reg int type, reg int io, reg Sfdisc_t* disc)
#else #else
_sfexcept(f,type,io,disc) _sfexcept(f,type,io,disc)
reg Sfio_t *f; /* stream where the exception happened */ reg Sfio_t *f; /* stream where the exception happened */

View file

@ -56,7 +56,7 @@
*/ */
#if __STD_C #if __STD_C
_sffilbuf(reg Sfio_t* f, reg int n) int _sffilbuf(reg Sfio_t* f, reg int n)
#else #else
_sffilbuf(f,n) _sffilbuf(f,n)
reg Sfio_t *f; /* fill the read buffer of this stream */ reg Sfio_t *f; /* fill the read buffer of this stream */

View file

@ -52,7 +52,7 @@
*/ */
#if __STD_C #if __STD_C
_sfflsbuf(reg Sfio_t* f, reg int c) int _sfflsbuf(reg Sfio_t* f, reg int c)
#else #else
_sfflsbuf(f,c) _sfflsbuf(f,c)
reg Sfio_t *f; /* write out the buffered content of this stream */ reg Sfio_t *f; /* write out the buffered content of this stream */

View file

@ -50,7 +50,7 @@
** Written by Kiem-Phong Vo (06/27/90) ** Written by Kiem-Phong Vo (06/27/90)
*/ */
#if __STD_C #if __STD_C
sfllen(reg long v) int sfllen(reg long v)
#else #else
sfllen(v) sfllen(v)
reg long v; reg long v;

View file

@ -95,7 +95,7 @@ static void _sfcleanup()
/* put into discrete pool */ /* put into discrete pool */
#if __STD_C #if __STD_C
_sfsetpool(Sfio_t* f) int _sfsetpool(Sfio_t* f)
#else #else
_sfsetpool(f) _sfsetpool(f)
Sfio_t* f; Sfio_t* f;
@ -214,7 +214,7 @@ typedef struct _sfp_
static Sfpopen_t* _Sfprocess; static Sfpopen_t* _Sfprocess;
#if __STD_C #if __STD_C
_sfpopen(reg Sfio_t* f, int fd, int pid) int _sfpopen(reg Sfio_t* f, int fd, int pid)
#else #else
_sfpopen(f, fd, pid) _sfpopen(f, fd, pid)
reg Sfio_t* f; reg Sfio_t* f;
@ -245,7 +245,7 @@ int pid;
} }
#if __STD_C #if __STD_C
_sfpclose(reg Sfio_t* f) int _sfpclose(reg Sfio_t* f)
#else #else
_sfpclose(f) _sfpclose(f)
reg Sfio_t* f; /* stream to close */ reg Sfio_t* f; /* stream to close */
@ -307,7 +307,7 @@ reg Sfio_t* f; /* stream to close */
} }
#if __STD_C #if __STD_C
static _sfpmode(Sfio_t* f, int type) static int _sfpmode(Sfio_t* f, int type)
#else #else
static _sfpmode(f,type) static _sfpmode(f,type)
Sfio_t* f; Sfio_t* f;
@ -413,7 +413,7 @@ int stack;
} }
#if __STD_C #if __STD_C
_sfmode(reg Sfio_t* f, reg int wanted, reg int local) int _sfmode(reg Sfio_t* f, reg int wanted, reg int local)
#else #else
_sfmode(f, wanted, local) _sfmode(f, wanted, local)
reg Sfio_t* f; /* change r/w mode and sync file pointer for this stream */ reg Sfio_t* f; /* change r/w mode and sync file pointer for this stream */

View file

@ -51,7 +51,7 @@
** Written by Kiem-Phong Vo (01/06/91) ** Written by Kiem-Phong Vo (01/06/91)
*/ */
#if __STD_C #if __STD_C
sfnotify(void (*notify)(Sfio_t*, int, int)) int sfnotify(void (*notify)(Sfio_t*, int, int))
#else #else
sfnotify(notify) sfnotify(notify)
void (*notify)(); void (*notify)();

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfnputc(reg Sfio_t* f, reg int c, reg int n) int sfnputc(reg Sfio_t* f, reg int c, reg int n)
#else #else
sfnputc(f,c,n) sfnputc(f,c,n)
reg Sfio_t *f; /* file to write */ reg Sfio_t *f; /* file to write */

View file

@ -113,7 +113,7 @@ reg char *mode; /* mode of the stream */
} }
#if __STD_C #if __STD_C
_sftype(reg const char *mode, int *oflagsp) int _sftype(reg const char *mode, int *oflagsp)
#else #else
_sftype(mode, oflagsp) _sftype(mode, oflagsp)
reg char *mode; reg char *mode;

View file

@ -52,7 +52,7 @@
*/ */
#if __STD_C #if __STD_C
sfpeek(reg Sfio_t* f, Void_t** bp, reg int size) int sfpeek(reg Sfio_t* f, Void_t** bp, reg int size)
#else #else
sfpeek(f,bp,size) sfpeek(f,bp,size)
reg Sfio_t* f; /* file to peek */ reg Sfio_t* f; /* file to peek */

View file

@ -61,7 +61,7 @@
#define SOCKET_PEEK 002 #define SOCKET_PEEK 002
#if __STD_C #if __STD_C
sfpkrd(int fd, Void_t* argbuf, int n, int rc, long tm, int action) int sfpkrd(int fd, Void_t* argbuf, int n, int rc, long tm, int action)
#else #else
sfpkrd(fd, argbuf, n, rc, tm, action) sfpkrd(fd, argbuf, n, rc, tm, action)
int fd; /* file descriptor */ int fd; /* file descriptor */

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfpoll(Sfio_t** fa, reg int n, int tm) int sfpoll(Sfio_t** fa, reg int n, int tm)
#else #else
sfpoll(fa, n, tm) sfpoll(fa, n, tm)
Sfio_t** fa; /* array of streams to poll */ Sfio_t** fa; /* array of streams to poll */

View file

@ -106,7 +106,7 @@ reg int mode;
/* move a stream to head */ /* move a stream to head */
#if __STD_C #if __STD_C
static _sfphead(Sfpool_t* p, Sfio_t* f, int n) static int _sfphead(Sfpool_t* p, Sfio_t* f, int n)
#else #else
static _sfphead(p, f, n) static _sfphead(p, f, n)
Sfpool_t* p; /* the pool */ Sfpool_t* p; /* the pool */

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfprintf(Sfio_t *f, const char *form, ...) int sfprintf(Sfio_t *f, const char *form, ...)
#else #else
sfprintf(va_alist) sfprintf(va_alist)
va_dcl va_dcl
@ -76,7 +76,7 @@ va_dcl
} }
#if __STD_C #if __STD_C
sfsprintf(char *s, int n, const char *form, ...) int sfsprintf(char *s, int n, const char *form, ...)
#else #else
sfsprintf(va_alist) sfsprintf(va_alist)
va_dcl va_dcl

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfpurge(reg Sfio_t* f) int sfpurge(reg Sfio_t* f)
#else #else
sfpurge(f) sfpurge(f)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
_sfputd(Sfio_t* f, reg double v) int _sfputd(Sfio_t* f, reg double v)
#else #else
_sfputd(f,v) _sfputd(f,v)
Sfio_t *f; Sfio_t *f;

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
_sfputl(reg Sfio_t* f, reg long v) int _sfputl(reg Sfio_t* f, reg long v)
#else #else
_sfputl(f,v) _sfputl(f,v)
reg Sfio_t *f; /* write a portable long to this stream */ reg Sfio_t *f; /* write a portable long to this stream */

View file

@ -53,7 +53,7 @@
** Written by Kiem-Phong Vo ** Written by Kiem-Phong Vo
*/ */
#if __STD_C #if __STD_C
sfputr(reg Sfio_t* f, const char* s, reg int rc) int sfputr(reg Sfio_t* f, const char* s, reg int rc)
#else #else
sfputr(f,s,rc) sfputr(f,s,rc)
reg Sfio_t* f; /* write to this stream. r11 on Vax */ reg Sfio_t* f; /* write to this stream. r11 on Vax */

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
_sfputu(reg Sfio_t* f, reg ulong v) int _sfputu(reg Sfio_t* f, reg ulong v)
#else #else
_sfputu(f,v) _sfputu(f,v)
reg Sfio_t *f; /* write a portable ulong to this stream */ reg Sfio_t *f; /* write a portable ulong to this stream */

View file

@ -77,7 +77,7 @@ static void _sfwrsync()
} }
#if __STD_C #if __STD_C
sfrd(reg Sfio_t* f, reg Void_t* buf, reg int n, reg Sfdisc_t* disc) int sfrd(reg Sfio_t* f, reg Void_t* buf, reg int n, reg Sfdisc_t* disc)
#else #else
sfrd(f,buf,n,disc) sfrd(f,buf,n,disc)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -54,7 +54,7 @@
*/ */
#if __STD_C #if __STD_C
sfread(reg Sfio_t* f, Void_t* buf, reg int n) int sfread(reg Sfio_t* f, Void_t* buf, reg int n)
#else #else
sfread(f,buf,n) sfread(f,buf,n)
reg Sfio_t* f; /* read from this stream. r11 on Vax */ reg Sfio_t* f; /* read from this stream. r11 on Vax */

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfscanf(Sfio_t *f, const char *form, ...) int sfscanf(Sfio_t *f, const char *form, ...)
#else #else
sfscanf(va_alist) sfscanf(va_alist)
va_dcl va_dcl
@ -76,7 +76,7 @@ va_dcl
} }
#if __STD_C #if __STD_C
sfsscanf(const char *s, const char *form,...) int sfsscanf(const char *s, const char *form,...)
#else #else
sfsscanf(va_alist) sfsscanf(va_alist)
va_dcl va_dcl

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
sfset(reg Sfio_t* f, reg int flags, reg int set) int sfset(reg Sfio_t* f, reg int flags, reg int set)
#else #else
sfset(f,flags,set) sfset(f,flags,set)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -51,7 +51,7 @@
*/ */
#if __STD_C #if __STD_C
static _sfdup(reg int fd, reg int newfd) static int _sfdup(reg int fd, reg int newfd)
#else #else
static _sfdup(fd,newfd) static _sfdup(fd,newfd)
reg int fd; reg int fd;
@ -80,7 +80,7 @@ reg int newfd;
} }
#if __STD_C #if __STD_C
sfsetfd(reg Sfio_t* f, reg int newfd) int sfsetfd(reg Sfio_t* f, reg int newfd)
#else #else
sfsetfd(f,newfd) sfsetfd(f,newfd)
reg Sfio_t *f; reg Sfio_t *f;

View file

@ -51,7 +51,7 @@
** Written by Kiem-Phong Vo (06/27/90) ** Written by Kiem-Phong Vo (06/27/90)
*/ */
static _sfall() static int _sfall()
{ {
reg Sfpool_t *p, *next; reg Sfpool_t *p, *next;
reg Sfio_t* f; reg Sfio_t* f;
@ -102,7 +102,7 @@ static _sfall()
} }
#if __STD_C #if __STD_C
sfsync(reg Sfio_t* f) int sfsync(reg Sfio_t* f)
#else #else
sfsync(f) sfsync(f)
reg Sfio_t* f; /* stream to be synchronized */ reg Sfio_t* f; /* stream to be synchronized */

View file

@ -130,7 +130,7 @@ char *name;
#endif /*_PACKAGE_ast*/ #endif /*_PACKAGE_ast*/
#if __STD_C #if __STD_C
static _tmpexcept(Sfio_t* f, int type, Sfdisc_t* disc) static int _tmpexcept(Sfio_t* f, int type, Sfdisc_t* disc)
#else #else
static _tmpexcept(f,type,disc) static _tmpexcept(f,type,disc)
Sfio_t* f; Sfio_t* f;

View file

@ -50,7 +50,7 @@
** Written by Kiem-Phong Vo (03/02/91) ** Written by Kiem-Phong Vo (03/02/91)
*/ */
#if __STD_C #if __STD_C
static _uexcept(reg Sfio_t* f, reg int type, reg Sfdisc_t* disc) static int _uexcept(reg Sfio_t* f, reg int type, reg Sfdisc_t* disc)
#else #else
static _uexcept(f,type,disc) static _uexcept(f,type,disc)
reg Sfio_t *f; reg Sfio_t *f;
@ -70,7 +70,7 @@ reg Sfdisc_t *disc;
} }
#if __STD_C #if __STD_C
sfungetc(reg Sfio_t* f, reg int c) int sfungetc(reg Sfio_t* f, reg int c)
#else #else
sfungetc(f,c) sfungetc(f,c)
reg Sfio_t *f; /* push back one byte to this stream */ reg Sfio_t *f; /* push back one byte to this stream */

View file

@ -99,7 +99,7 @@
} }
#if __STD_C #if __STD_C
sfvprintf(Sfio_t* f, const char* form, va_list args) int sfvprintf(Sfio_t* f, const char* form, va_list args)
#else #else
sfvprintf(f,form,args) sfvprintf(f,form,args)
Sfio_t* f; /* file to print to */ Sfio_t* f; /* file to print to */

View file

@ -136,7 +136,7 @@ int* rs;
} }
#if __STD_C #if __STD_C
sfvscanf(Sfio_t* f, reg const char* form, va_list args) int sfvscanf(Sfio_t* f, reg const char* form, va_list args)
#else #else
sfvscanf(f,form,args) sfvscanf(f,form,args)
Sfio_t *f; /* file to be scanned */ Sfio_t *f; /* file to be scanned */

View file

@ -52,7 +52,7 @@
/* hole preserving writes */ /* hole preserving writes */
#if __STD_C #if __STD_C
static sfoutput(Sfio_t* f, reg char* buf, reg int n) static int sfoutput(Sfio_t* f, reg char* buf, reg int n)
#else #else
static sfoutput(f,buf,n) static sfoutput(f,buf,n)
Sfio_t* f; Sfio_t* f;
@ -144,7 +144,7 @@ reg int n;
} }
#if __STD_C #if __STD_C
sfwr(reg Sfio_t* f, reg const Void_t* buf, reg int n, reg Sfdisc_t* disc) int sfwr(reg Sfio_t* f, reg const Void_t* buf, reg int n, reg Sfdisc_t* disc)
#else #else
sfwr(f,buf,n,disc) sfwr(f,buf,n,disc)
reg Sfio_t* f; reg Sfio_t* f;

View file

@ -54,7 +54,7 @@
*/ */
#if __STD_C #if __STD_C
sfwrite(reg Sfio_t* f, const Void_t* buf, reg int n) int sfwrite(reg Sfio_t* f, const Void_t* buf, reg int n)
#else #else
sfwrite(f,buf,n) sfwrite(f,buf,n)
reg Sfio_t* f; /* write to this stream. r11 on Vax */ reg Sfio_t* f; /* write to this stream. r11 on Vax */

View file

@ -53,7 +53,7 @@
*/ */
#if __STD_C #if __STD_C
_stdprintf(const char *form, ...) int _stdprintf(const char *form, ...)
#else #else
_stdprintf(va_alist) _stdprintf(va_alist)
va_dcl va_dcl

View file

@ -52,7 +52,7 @@
*/ */
#if __STD_C #if __STD_C
_stdscanf(const char *form, ...) int _stdscanf(const char *form, ...)
#else #else
_stdscanf(va_alist) _stdscanf(va_alist)
va_dcl va_dcl

View file

@ -54,7 +54,7 @@
#if __STD_C #if __STD_C
_stdsprintf(char *s, const char *form, ...) int _stdsprintf(char *s, const char *form, ...)
#else #else
_stdsprintf(va_alist) _stdsprintf(va_alist)
va_dcl va_dcl

View file

@ -52,7 +52,7 @@
*/ */
#if __STD_C #if __STD_C
_stdsetvbuf(Sfio_t* f, char *buf, int type, int size) int _stdsetvbuf(Sfio_t* f, char *buf, int type, int size)
#else #else
_stdsetvbuf(f,buf,type,size) _stdsetvbuf(f,buf,type,size)
Sfio_t *f; Sfio_t *f;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
_stdvsnprintf(char* s, int n, const char* form, va_list args) int _stdvsnprintf(char* s, int n, const char* form, va_list args)
#else #else
_stdvsnprintf(s,n,form,args) _stdvsnprintf(s,n,form,args)
reg char* s; reg char* s;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
_stdvsprintf(char *s, const char *form, va_list args) int _stdvsprintf(char *s, const char *form, va_list args)
#else #else
_stdvsprintf(s,form,args) _stdvsprintf(s,form,args)
char *s; char *s;

View file

@ -46,7 +46,7 @@
#include "sfhdr.h" #include "sfhdr.h"
#if __STD_C #if __STD_C
_stdvsscanf(char *s, const char *form, va_list args) int _stdvsscanf(char *s, const char *form, va_list args)
#else #else
_stdvsscanf(s,form,args) _stdvsscanf(s,form,args)
char *s; char *s;

View file

@ -169,7 +169,7 @@ char* ends;
} }
#if __STD_C #if __STD_C
static createfile(char* file) static int createfile(char* file)
#else #else
static createfile(file) static createfile(file)
char* file; char* file;
@ -212,7 +212,7 @@ static void pfprint()
vmprofile(Vmregion,_Vmpffd); vmprofile(Vmregion,_Vmpffd);
} }
static vmflinit() static int vmflinit()
{ {
char* env; char* env;
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -325,7 +325,7 @@ Block_t* wanted;
/* Reclaim all delayed free blocks into the free tree */ /* Reclaim all delayed free blocks into the free tree */
#if __STD_C #if __STD_C
static bestreclaim(reg Vmdata_t* vd, Block_t* wanted, int c) static int bestreclaim(reg Vmdata_t* vd, Block_t* wanted, int c)
#else #else
static bestreclaim(vd, wanted, c) static bestreclaim(vd, wanted, c)
reg Vmdata_t* vd; reg Vmdata_t* vd;
@ -687,7 +687,7 @@ done:
} }
#if __STD_C #if __STD_C
static bestfree(Vmalloc_t* vm, Void_t* data ) static int bestfree(Vmalloc_t* vm, Void_t* data )
#else #else
static bestfree(vm, data ) static bestfree(vm, data )
Vmalloc_t* vm; Vmalloc_t* vm;
@ -924,7 +924,7 @@ done:
} }
#if __STD_C #if __STD_C
static bestcompact(Vmalloc_t* vm) static int bestcompact(Vmalloc_t* vm)
#else #else
static bestcompact(vm) static bestcompact(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -50,7 +50,7 @@
** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94. ** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94.
*/ */
#if __STD_C #if __STD_C
vmclear(Vmalloc_t* vm) int vmclear(Vmalloc_t* vm)
#else #else
vmclear(vm) vmclear(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -50,7 +50,7 @@
** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94. ** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94.
*/ */
#if __STD_C #if __STD_C
vmclose(Vmalloc_t* vm) int vmclose(Vmalloc_t* vm)
#else #else
vmclose(vm) vmclose(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -542,7 +542,7 @@ int flags; /* VM_RS* */
/* compact any residual free space */ /* compact any residual free space */
#if __STD_C #if __STD_C
static dbcompact(Vmalloc_t* vm) static int dbcompact(Vmalloc_t* vm)
#else #else
static dbcompact(vm) static dbcompact(vm)
Vmalloc_t* vm; Vmalloc_t* vm;
@ -553,7 +553,7 @@ Vmalloc_t* vm;
/* check for memory overwrites over all live blocks */ /* check for memory overwrites over all live blocks */
#if __STD_C #if __STD_C
vmdbcheck(Vmalloc_t* vm) int vmdbcheck(Vmalloc_t* vm)
#else #else
vmdbcheck(vm) vmdbcheck(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -327,7 +327,7 @@ Void_t* addr;
} }
#if __STD_C #if __STD_C
static lastcompact(Vmalloc_t* vm) static int lastcompact(Vmalloc_t* vm)
#else #else
static lastcompact(vm) static lastcompact(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -265,7 +265,7 @@ Void_t* addr;
} }
#if __STD_C #if __STD_C
static poolcompact(Vmalloc_t* vm) static int poolcompact(Vmalloc_t* vm)
#else #else
static poolcompact(vm) static poolcompact(vm)
Vmalloc_t* vm; Vmalloc_t* vm;

View file

@ -213,7 +213,7 @@ Vmsearch_f searchf; /* tree search function */
/* Truncate a segment if possible */ /* Truncate a segment if possible */
#if __STD_C #if __STD_C
vmtruncate(Vmalloc_t* vm, Seg_t* seg, size_t size, int exact) int vmtruncate(Vmalloc_t* vm, Seg_t* seg, size_t size, int exact)
#else #else
vmtruncate(vm, seg, size, exact) vmtruncate(vm, seg, size, exact)
Vmalloc_t* vm; /* containing region */ Vmalloc_t* vm; /* containing region */

View file

@ -369,7 +369,7 @@ ulong size;
/* print profile data */ /* print profile data */
#if __STD_C #if __STD_C
vmprofile(Vmalloc_t* vm, int fd) int vmprofile(Vmalloc_t* vm, int fd)
#else #else
vmprofile(vm, fd) vmprofile(vm, fd)
Vmalloc_t* vm; Vmalloc_t* vm;

Some files were not shown because too many files have changed in this diff Show more