?*) z=$lib
e=
lib=
- echo "main(){return(0);}" > $tmp.c
+ echo "int main(){return(0);}" > $tmp.c
for x in $z
do case $x in
-) case $lib in
#endif"
;;
esac
- echo "main(){char* i = (char*)&$v; return i!=0;}"
+ echo "int main(){char* i = (char*)&$v; return i!=0;}"
} > $tmp.c
$cc -c $tmp.c <&$nullin >&$nullout &&
rm -f $tmp.exe
struct xxx* f() { return &v; }"
;;
esac
- echo "main() { f(); return 0; }"
+ echo "int main() { f(); return 0; }"
} > $tmp.c
rm -f $tmp.exe
if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout &&
?*) z=$lib
e=
lib=
- echo "main(){return(0);}" > $tmp.c
+ echo "int main(){return(0);}" > $tmp.c
for x in $z
do case $x in
-) case $lib in
_BEGIN_EXTERNS_
extern int $statictest;
_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
if $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe
then case $static in
.) static=
echo '#include <stdio.h>
-main(){printf("hello");return(0);}' > $tmp.c
+int main(){printf("hello");return(0);}' > $tmp.c
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
then e=`wc -l $tmp.e`
_END_EXTERNS_"
;;
esac
- echo "main(){char* i = (char*)&$v; return i!=0;}"
+ echo "int main(){char* i = (char*)&$v; return i!=0;}"
} > $tmp.c
$cc -c $tmp.c <&$nullin >&$nullout &&
rm -f $tmp.exe
_BEGIN_EXTERNS_
extern int $v();
_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 &&
rm -f $tmp.exe
if $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe
struct xxx* f() { return &v; }"
;;
esac
- echo "main() { f(); return 0; }"
+ echo "int main() { f(); return 0; }"
} > $tmp.c
rm -f $tmp.exe
if $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout &&
;;
*) _ship_probe_PATH=$PATH
case $CC in
- "") echo 'main() { return 0; }' > ${_tmp_}0.c
+ "") echo 'int main() { return 0; }' > ${_tmp_}0.c
cat > $_tmp_.c <<'!'
#include <stdio.h>
#include <limits.h>
#else
int
#endif
-main(int argc, char** argv) { return 0; }
+int main(int argc, char** argv) { return 0; }
#endif
" > $_tmp_.c
if $CC $CCFLAGS -c $_tmp_.c >/dev/null 2>&1
echo "#include <sys/types.h>
#include <sys/socket.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"
do if $CC $CCFLAGS $i -o $_tmp_.exe $_tmp_.c >/dev/null 2>&1
then case $i in
eval `(
mkdir /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
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=' '"
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
then e=\`wc -l e\`
s=\`wc pic.o\`
"xap", shipxap,
};
-int
-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;){
char* s;
int i;
return(flags);
}
-int
-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;){
char* b;
char* file;
int fd;
make FEATURE/externs implicit
make 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_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_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_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_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_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_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 '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 '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 '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 '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 '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}
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
}
-static e3 __PARAM__((void), ()){
+static int e3 __PARAM__((void), ()){
char *arg, *cp;
int op;
char *binop;
}
}
-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;
if(op&TEST_ARITH)
{
* 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;
if(test_stat(file1,&stat1)>=0 && test_stat(file2,&stat2)>=0)
if(stat1.st_dev == stat2.st_dev && stat1.st_ino == stat2.st_ino)
* 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)
return(-1);
if(strmatch(name,(char*)e_devfdNN))
* 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();
char *staksav = stakptr(0);
struct comnod *comptr = (struct comnod*)stakalloc(sizeof(struct comnod));
* look for edit macro named _i
* 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;
Namval_t *np;
genchar buff[LOOKAHEAD+1];
/*
* Enter the fc command on the current history line
*/
-ed_fulledit __PARAM__((void), ()){
+int ed_fulledit __PARAM__((void), ()){
char *cp;
if(!sh.hist_ptr)
return(-1);
*
}*/
-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
struct ltchars lchars;
#endif /* L_MASK */
# define IEXTEN 0
# 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)
{
case ECHOMODE:
* 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 *dp = phys;
int c;
* 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 state = 0;
int c;
static int cr_ok;
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 i;
genchar *out;
*
-*/
-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 term_char; /* read() termination character */
char prompt[PRSIZE+2]; /* prompt */
YACCFLAGS=-d
mam_libast=$${mam_cc_L+-last}$${mam_cc_L-${PACKAGE_ast_LIB}/libast.a}
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 \
>/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 \
>/dev/null 2>&1 && echo ' -ljobs'; rm -f x.$${!-$$$$}.[cox])`
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 \
>/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 \
>/dev/null 2>&1 && echo ' -li'; rm -f x.$${!-$$$$}.[cox])`
PACKAGE_ast=${INSTALLROOT}
CPP=${CC} -E
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 \
>/dev/null 2>&1 && echo ' -lm'; rm -f x.$${!-$$$$}.[cox])`
INSTALLROOT=../../..
AR=ar
AS=as
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 \
>/dev/null 2>&1 && echo ' -ldld'; rm -f x.$${!-$$$$}.[cox])`
CPIO=cpio
* returns -1 for failure, 0 for success
* <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;
if(mode==X_OK)
return(-1);
* 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;
if(!pw || !(pw=job_byjid((int)pw->p_job)))
return(1);
}
#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;
int fdin;
Sfio_t *iop;
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 };
-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;
union anynode *t;
char *cp;
static gid_t egroupid;
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;
char *p;
struct stat statx;
* 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;
if (stat(name, &statb) == 0)
{
}
#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)
setregid(rgroupid,group);
}
#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();
if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC))
{
* 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;
while(c = *s++)
{
/*NOTREACHED*/
}
+int
main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
int c;
char* s;
mkdir suffix
cd suffix
for src in $probe_src
-do echo "main(){return 0;}" > ../test.$src
+do echo "int main(){return 0;}" > ../test.$src
rm -f test*
if $cc -c ../test.$src
then set test.*
case $src in
c) ;;
*) echo '// (
-main()
+int main()
{
class { public: int i; } j;
j.i = 0;
done
echo '#include <stdio.h>
-main(){printf("hello");return(0);}' > dynamic.$src
+int main(){printf("hello");return(0);}' > dynamic.$src
if $cc -c dynamic.$src
then eval set x $probe_so
while :
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
cp /bin/echo cpp
case $src in
c) ;;
*) echo '#include <iostream.h>
-main()
+int main()
{
cout << "hello world";
return 0;
done
echo '#include <stdio.h>
-main(){printf("hello");return(0);}' > dynamic.$src
+int main(){printf("hello");return(0);}' > dynamic.$src
if $cc -c dynamic.$src
then eval set x $probe_so
while :
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
cp /bin/echo cpp
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int i;
int j;
extern __MANGLE__ int getgroups __PROTO__((int, gid_t*));
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
#if _lib_getgroups
if (sizeof(gid_t) < sizeof(int))
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int f_local = 0;
int f_lck = 0;
static int size[] = { 1, 2, 4, 8 };
-main()
+int main()
{
int t;
int s;
#define child() spawnve(cmd[0],cmd,(char**)0)
#endif
-main()
+int main()
{
int i;
int n;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int n;
int idperm;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int i;
int j;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
#endif
-main()
+int main()
{
int sep = 0;
long val;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int i;
int j;
extern __MANGLE__ int getgroups __PROTO__((int, gid_t*));
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
#if _lib_getgroups
if (sizeof(gid_t) < sizeof(int))
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int f_local = 0;
int f_lck = 0;
static int size[] = { 1, 2, 4, 8 };
-main()
+int main()
{
int t;
int s;
#include "conflib.h"
-main()
+int main()
{
int i;
int n;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int n;
int idperm;
extern __MANGLE__ int printf __PROTO__((const char*, ...));
-main()
+int main()
{
int i;
int j;
#include "conflib.h"
-main()
+int main()
{
#include "confuni.h"
return(0);
*/
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;
int v;
Hash_position_t* pos;
/*
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)();){
char *path = (char*)cpath;
int cdrv; /* chdir value */
#include "sfhdr.h"
#if __STD_C
-static __sfclrerr(reg Sfio_t* f)
+static int __sfclrerr(reg Sfio_t* f)
#else
static __sfclrerr(f)
reg Sfio_t *f;
#undef sfclrerr
#if __STD_C
-sfclrerr(reg Sfio_t* f)
+int sfclrerr(reg Sfio_t* f)
#else
sfclrerr(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfeof(reg Sfio_t* f)
+static int __sfeof(reg Sfio_t* f)
#else
static __sfeof(f)
reg Sfio_t *f;
#undef sfeof
#if __STD_C
-sfeof(reg Sfio_t* f)
+int sfeof(reg Sfio_t* f)
#else
sfeof(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sferror(reg Sfio_t* f)
+static int __sferror(reg Sfio_t* f)
#else
static __sferror(f)
reg Sfio_t *f;
#undef sferror
#if __STD_C
-sferror(reg Sfio_t* f)
+int sferror(reg Sfio_t* f)
#else
sferror(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sffileno(reg Sfio_t* f)
+static int __sffileno(reg Sfio_t* f)
#else
static __sffileno(f)
reg Sfio_t *f;
#undef sffileno
#if __STD_C
-sffileno(reg Sfio_t* f)
+int sffileno(reg Sfio_t* f)
#else
sffileno(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfgetc(reg Sfio_t* f)
+static int __sfgetc(reg Sfio_t* f)
#else
static __sfgetc(f)
reg Sfio_t *f;
#undef sfgetc
#if __STD_C
-sfgetc(reg Sfio_t* f)
+int sfgetc(reg Sfio_t* f)
#else
sfgetc(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfputc(reg Sfio_t* f, reg int c)
+static int __sfputc(reg Sfio_t* f, reg int c)
#else
static __sfputc(f,c)
reg Sfio_t *f;
#undef sfputc
#if __STD_C
-sfputc(reg Sfio_t* f, reg int c)
+int sfputc(reg Sfio_t* f, reg int c)
#else
sfputc(f,c)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfputd(reg Sfio_t* f, reg double v)
+static int __sfputd(reg Sfio_t* f, reg double v)
#else
static __sfputd(f,v)
reg Sfio_t *f;
#undef sfputd
#if __STD_C
-sfputd(reg Sfio_t* f, reg double v)
+int sfputd(reg Sfio_t* f, reg double v)
#else
sfputd(f,v)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfputl(reg Sfio_t* f, reg long v)
+static int __sfputl(reg Sfio_t* f, reg long v)
#else
static __sfputl(f,v)
reg Sfio_t *f;
#undef sfputl
#if __STD_C
-sfputl(reg Sfio_t* f, reg long v)
+int sfputl(reg Sfio_t* f, reg long v)
#else
sfputl(f,v)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfputu(reg Sfio_t* f, reg ulong v)
+static int __sfputu(reg Sfio_t* f, reg ulong v)
#else
static __sfputu(f,v)
reg Sfio_t *f;
#undef sfputu
#if __STD_C
-sfputu(reg Sfio_t* f, reg ulong v)
+int sfputu(reg Sfio_t* f, reg ulong v)
#else
sfputu(f,v)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfslen(void)
+static int __sfslen(void)
#else
static __sfslen()
#endif
#undef sfslen
#if __STD_C
-sfslen(void)
+int sfslen(void)
#else
sfslen()
#endif
#include "sfhdr.h"
#if __STD_C
-static __sfstacked(reg Sfio_t* f)
+static int __sfstacked(reg Sfio_t* f)
#else
static __sfstacked(f)
reg Sfio_t *f;
#undef sfstacked
#if __STD_C
-sfstacked(reg Sfio_t* f)
+int sfstacked(reg Sfio_t* f)
#else
sfstacked(f)
reg Sfio_t *f;
#include "sfhdr.h"
#if __STD_C
-static __sfulen(reg ulong v)
+static int __sfulen(reg ulong v)
#else
static __sfulen(v)
reg ulong v;
#undef sfulen
#if __STD_C
-sfulen(reg ulong v)
+int sfulen(reg ulong v)
#else
sfulen(v)
reg ulong v;
*/
#if __STD_C
-sfclose(reg Sfio_t* f)
+int sfclose(reg Sfio_t* f)
#else
sfclose(f)
reg Sfio_t* f;
** Written by Kiem-Phong Vo (07/20/90).
*/
#if __STD_C
-sfclrlock(reg Sfio_t* f)
+int sfclrlock(reg Sfio_t* f)
#else
sfclrlock(f)
reg Sfio_t *f;
*/
#if __STD_C
-sfdlen(reg double v)
+int sfdlen(reg double v)
#else
sfdlen(v)
reg double v;
** Written by Kiem-Phong Vo (8/18/90)
*/
#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
_sfexcept(f,type,io,disc)
reg Sfio_t *f; /* stream where the exception happened */
*/
#if __STD_C
-_sffilbuf(reg Sfio_t* f, reg int n)
+int _sffilbuf(reg Sfio_t* f, reg int n)
#else
_sffilbuf(f,n)
reg Sfio_t *f; /* fill the read buffer of this stream */
*/
#if __STD_C
-_sfflsbuf(reg Sfio_t* f, reg int c)
+int _sfflsbuf(reg Sfio_t* f, reg int c)
#else
_sfflsbuf(f,c)
reg Sfio_t *f; /* write out the buffered content of this stream */
** Written by Kiem-Phong Vo (06/27/90)
*/
#if __STD_C
-sfllen(reg long v)
+int sfllen(reg long v)
#else
sfllen(v)
reg long v;
/* put into discrete pool */
#if __STD_C
-_sfsetpool(Sfio_t* f)
+int _sfsetpool(Sfio_t* f)
#else
_sfsetpool(f)
Sfio_t* f;
static Sfpopen_t* _Sfprocess;
#if __STD_C
-_sfpopen(reg Sfio_t* f, int fd, int pid)
+int _sfpopen(reg Sfio_t* f, int fd, int pid)
#else
_sfpopen(f, fd, pid)
reg Sfio_t* f;
}
#if __STD_C
-_sfpclose(reg Sfio_t* f)
+int _sfpclose(reg Sfio_t* f)
#else
_sfpclose(f)
reg Sfio_t* f; /* stream to close */
}
#if __STD_C
-static _sfpmode(Sfio_t* f, int type)
+static int _sfpmode(Sfio_t* f, int type)
#else
static _sfpmode(f,type)
Sfio_t* f;
}
#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
_sfmode(f, wanted, local)
reg Sfio_t* f; /* change r/w mode and sync file pointer for this stream */
** Written by Kiem-Phong Vo (01/06/91)
*/
#if __STD_C
-sfnotify(void (*notify)(Sfio_t*, int, int))
+int sfnotify(void (*notify)(Sfio_t*, int, int))
#else
sfnotify(notify)
void (*notify)();
*/
#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
sfnputc(f,c,n)
reg Sfio_t *f; /* file to write */
}
#if __STD_C
-_sftype(reg const char *mode, int *oflagsp)
+int _sftype(reg const char *mode, int *oflagsp)
#else
_sftype(mode, oflagsp)
reg char *mode;
*/
#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
sfpeek(f,bp,size)
reg Sfio_t* f; /* file to peek */
#define SOCKET_PEEK 002
#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
sfpkrd(fd, argbuf, n, rc, tm, action)
int fd; /* file descriptor */
*/
#if __STD_C
-sfpoll(Sfio_t** fa, reg int n, int tm)
+int sfpoll(Sfio_t** fa, reg int n, int tm)
#else
sfpoll(fa, n, tm)
Sfio_t** fa; /* array of streams to poll */
/* move a stream to head */
#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
static _sfphead(p, f, n)
Sfpool_t* p; /* the pool */
*/
#if __STD_C
-sfprintf(Sfio_t *f, const char *form, ...)
+int sfprintf(Sfio_t *f, const char *form, ...)
#else
sfprintf(va_alist)
va_dcl
}
#if __STD_C
-sfsprintf(char *s, int n, const char *form, ...)
+int sfsprintf(char *s, int n, const char *form, ...)
#else
sfsprintf(va_alist)
va_dcl
*/
#if __STD_C
-sfpurge(reg Sfio_t* f)
+int sfpurge(reg Sfio_t* f)
#else
sfpurge(f)
reg Sfio_t *f;
*/
#if __STD_C
-_sfputd(Sfio_t* f, reg double v)
+int _sfputd(Sfio_t* f, reg double v)
#else
_sfputd(f,v)
Sfio_t *f;
*/
#if __STD_C
-_sfputl(reg Sfio_t* f, reg long v)
+int _sfputl(reg Sfio_t* f, reg long v)
#else
_sfputl(f,v)
reg Sfio_t *f; /* write a portable long to this stream */
** Written by Kiem-Phong Vo
*/
#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
sfputr(f,s,rc)
reg Sfio_t* f; /* write to this stream. r11 on Vax */
*/
#if __STD_C
-_sfputu(reg Sfio_t* f, reg ulong v)
+int _sfputu(reg Sfio_t* f, reg ulong v)
#else
_sfputu(f,v)
reg Sfio_t *f; /* write a portable ulong to this stream */
}
#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
sfrd(f,buf,n,disc)
reg Sfio_t *f;
*/
#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
sfread(f,buf,n)
reg Sfio_t* f; /* read from this stream. r11 on Vax */
*/
#if __STD_C
-sfscanf(Sfio_t *f, const char *form, ...)
+int sfscanf(Sfio_t *f, const char *form, ...)
#else
sfscanf(va_alist)
va_dcl
}
#if __STD_C
-sfsscanf(const char *s, const char *form,...)
+int sfsscanf(const char *s, const char *form,...)
#else
sfsscanf(va_alist)
va_dcl
*/
#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
sfset(f,flags,set)
reg Sfio_t *f;
*/
#if __STD_C
-static _sfdup(reg int fd, reg int newfd)
+static int _sfdup(reg int fd, reg int newfd)
#else
static _sfdup(fd,newfd)
reg int fd;
}
#if __STD_C
-sfsetfd(reg Sfio_t* f, reg int newfd)
+int sfsetfd(reg Sfio_t* f, reg int newfd)
#else
sfsetfd(f,newfd)
reg Sfio_t *f;
** Written by Kiem-Phong Vo (06/27/90)
*/
-static _sfall()
+static int _sfall()
{
reg Sfpool_t *p, *next;
reg Sfio_t* f;
}
#if __STD_C
-sfsync(reg Sfio_t* f)
+int sfsync(reg Sfio_t* f)
#else
sfsync(f)
reg Sfio_t* f; /* stream to be synchronized */
#endif /*_PACKAGE_ast*/
#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
static _tmpexcept(f,type,disc)
Sfio_t* f;
** Written by Kiem-Phong Vo (03/02/91)
*/
#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
static _uexcept(f,type,disc)
reg Sfio_t *f;
}
#if __STD_C
-sfungetc(reg Sfio_t* f, reg int c)
+int sfungetc(reg Sfio_t* f, reg int c)
#else
sfungetc(f,c)
reg Sfio_t *f; /* push back one byte to this stream */
}
#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
sfvprintf(f,form,args)
Sfio_t* f; /* file to print to */
}
#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
sfvscanf(f,form,args)
Sfio_t *f; /* file to be scanned */
/* hole preserving writes */
#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
static sfoutput(f,buf,n)
Sfio_t* f;
}
#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
sfwr(f,buf,n,disc)
reg Sfio_t* f;
*/
#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
sfwrite(f,buf,n)
reg Sfio_t* f; /* write to this stream. r11 on Vax */
*/
#if __STD_C
-_stdprintf(const char *form, ...)
+int _stdprintf(const char *form, ...)
#else
_stdprintf(va_alist)
va_dcl
*/
#if __STD_C
-_stdscanf(const char *form, ...)
+int _stdscanf(const char *form, ...)
#else
_stdscanf(va_alist)
va_dcl
#if __STD_C
-_stdsprintf(char *s, const char *form, ...)
+int _stdsprintf(char *s, const char *form, ...)
#else
_stdsprintf(va_alist)
va_dcl
*/
#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
_stdsetvbuf(f,buf,type,size)
Sfio_t *f;
#include "sfhdr.h"
#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
_stdvsnprintf(s,n,form,args)
reg char* s;
#include "sfhdr.h"
#if __STD_C
-_stdvsprintf(char *s, const char *form, va_list args)
+int _stdvsprintf(char *s, const char *form, va_list args)
#else
_stdvsprintf(s,form,args)
char *s;
#include "sfhdr.h"
#if __STD_C
-_stdvsscanf(char *s, const char *form, va_list args)
+int _stdvsscanf(char *s, const char *form, va_list args)
#else
_stdvsscanf(s,form,args)
char *s;
}
#if __STD_C
-static createfile(char* file)
+static int createfile(char* file)
#else
static createfile(file)
char* file;
vmprofile(Vmregion,_Vmpffd);
}
-static vmflinit()
+static int vmflinit()
{
char* env;
Vmalloc_t* vm;
/* Reclaim all delayed free blocks into the free tree */
#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
static bestreclaim(vd, wanted, c)
reg Vmdata_t* vd;
}
#if __STD_C
-static bestfree(Vmalloc_t* vm, Void_t* data )
+static int bestfree(Vmalloc_t* vm, Void_t* data )
#else
static bestfree(vm, data )
Vmalloc_t* vm;
}
#if __STD_C
-static bestcompact(Vmalloc_t* vm)
+static int bestcompact(Vmalloc_t* vm)
#else
static bestcompact(vm)
Vmalloc_t* vm;
** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94.
*/
#if __STD_C
-vmclear(Vmalloc_t* vm)
+int vmclear(Vmalloc_t* vm)
#else
vmclear(vm)
Vmalloc_t* vm;
** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94.
*/
#if __STD_C
-vmclose(Vmalloc_t* vm)
+int vmclose(Vmalloc_t* vm)
#else
vmclose(vm)
Vmalloc_t* vm;
/* compact any residual free space */
#if __STD_C
-static dbcompact(Vmalloc_t* vm)
+static int dbcompact(Vmalloc_t* vm)
#else
static dbcompact(vm)
Vmalloc_t* vm;
/* check for memory overwrites over all live blocks */
#if __STD_C
-vmdbcheck(Vmalloc_t* vm)
+int vmdbcheck(Vmalloc_t* vm)
#else
vmdbcheck(vm)
Vmalloc_t* vm;
}
#if __STD_C
-static lastcompact(Vmalloc_t* vm)
+static int lastcompact(Vmalloc_t* vm)
#else
static lastcompact(vm)
Vmalloc_t* vm;
}
#if __STD_C
-static poolcompact(Vmalloc_t* vm)
+static int poolcompact(Vmalloc_t* vm)
#else
static poolcompact(vm)
Vmalloc_t* vm;
/* Truncate a segment if possible */
#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
vmtruncate(vm, seg, size, exact)
Vmalloc_t* vm; /* containing region */
/* print profile data */
#if __STD_C
-vmprofile(Vmalloc_t* vm, int fd)
+int vmprofile(Vmalloc_t* vm, int fd)
#else
vmprofile(vm, fd)
Vmalloc_t* vm;
** Written by (Kiem-)Phong Vo, kpv@research.att.com, 01/16/94.
*/
#if __STD_C
-vmset(reg Vmalloc_t* vm, int flags, int on)
+int vmset(reg Vmalloc_t* vm, int flags, int on)
#else
vmset(vm, flags, on)
reg Vmalloc_t* vm; /* region being worked on */
*/
#if __STD_C
-vmstat(Vmalloc_t* vm, Vmstat_t* st)
+int vmstat(Vmalloc_t* vm, Vmstat_t* st)
#else
vmstat(vm, st)
Vmalloc_t* vm;
}
#if __STD_C
-vmtrace(int file)
+int vmtrace(int file)
#else
vmtrace(file)
int file;
make features/symlink
done features/symlink
make cmd.req
-exec - echo 'main(){return(0);}' > 1.${COTEMP}.c
+exec - echo 'int main(){return(0);}' > 1.${COTEMP}.c
exec - ${CC} ${CCFLAGS} -c 1.${COTEMP}.c &&
exec - set +x
exec - x=`${CC} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
/*
* compute the line, word, and character count for file <fd>
*/
-wc_count __PARAM__((Wc_t *wp, Sfio_t *fd), (wp, fd)) __OTORP__(Wc_t *wp; Sfio_t *fd;){
+int wc_count __PARAM__((Wc_t *wp, Sfio_t *fd), (wp, fd)) __OTORP__(Wc_t *wp; Sfio_t *fd;){
signed char *space = wp->space;
unsigned char *cp;
long nwords;
/* encode and output delta instructions */
#if __STD_C
-static vdputinst(Table_t* tab, uchar* begs, uchar* here, Match_t* match, int n_copy)
+static int vdputinst(Table_t* tab, uchar* begs, uchar* here, Match_t* match, int n_copy)
#else
static vdputinst(tab, begs, here, match, n_copy)
Table_t* tab;
/* Fold a string */
#if __STD_C
-static vdfold(Table_t* tab, int output)
+static int vdfold(Table_t* tab, int output)
#else
static vdfold(tab, output)
Table_t* tab;
*/
#if __STD_C
-static _vdinit(reg Vdio_t* io)
+static int _vdinit(reg Vdio_t* io)
#else
static _vdinit(io)
reg Vdio_t* io;
#if __STD_C
-static _vdfilbuf(reg Vdio_t* io)
+static int _vdfilbuf(reg Vdio_t* io)
#else
static _vdfilbuf(io)
reg Vdio_t* io;
}
#if __STD_C
-static _vdflsbuf(reg Vdio_t* io)
+static int _vdflsbuf(reg Vdio_t* io)
#else
static _vdflsbuf(io)
reg Vdio_t* io;
}
#if __STD_C
-static _vdputu(reg Vdio_t* io, ulong v)
+static int _vdputu(reg Vdio_t* io, ulong v)
#else
static _vdputu(io, v)
reg Vdio_t* io;
}
#if __STD_C
-static _vdread(Vdio_t* io, reg uchar* s, reg int n)
+static int _vdread(Vdio_t* io, reg uchar* s, reg int n)
#else
static _vdread(io, s, n)
Vdio_t* io;
}
#if __STD_C
-static _vdwrite(Vdio_t* io, reg uchar* s, reg int n)
+static int _vdwrite(Vdio_t* io, reg uchar* s, reg int n)
#else
static _vdwrite(io, s, n)
Vdio_t* io;
} Table_t;
#if __STD_C
-static vdunfold(Table_t* tab)
+static int vdunfold(Table_t* tab)
#else
static vdunfold(tab)
Table_t* tab;