retire _PROTOTYPE
. only good for obsolete K&R support . also remove a stray ansi.h and the proto cmd
This commit is contained in:
parent
cf720a028a
commit
6a73e85ad1
475 changed files with 5256 additions and 6252 deletions
|
@ -21,7 +21,7 @@ SUBDIR= add_route arp ash at awk \
|
|||
mkproto mount mt netconf newroot nice acknm nohup \
|
||||
nonamed od paste patch pax \
|
||||
ping postinstall poweroff pr prep printf printroot \
|
||||
profile progressbar proto pr_routes ps pwd pwdauth \
|
||||
profile progressbar pr_routes ps pwd pwdauth \
|
||||
ramdisk rarpd rawspeed rcp rdate readall readclock \
|
||||
reboot remsync rev rget rlogin \
|
||||
rotate rsh rshd sed service setup shar acksize \
|
||||
|
|
|
@ -44,11 +44,11 @@ char io_buf[BUFSIZ]; /* io buffer */
|
|||
struct exec header; /* header of a.out file */
|
||||
int stbl_elems; /* #elements in symbol table */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(int nm_sort, (const void *tmp_stbl1, const void *tmp_stbl2));
|
||||
_PROTOTYPE(void nm, (char *file));
|
||||
_PROTOTYPE(int read_header, (int fd));
|
||||
_PROTOTYPE(void nm_print, (char *file, struct nlist *stbl));
|
||||
int main(int argc, char **argv);
|
||||
int nm_sort(const void *tmp_stbl1, const void *tmp_stbl2);
|
||||
void nm(char *file);
|
||||
int read_header(int fd);
|
||||
void nm_print(char *file, struct nlist *stbl);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
int heading; /* set when heading printed */
|
||||
int error;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void size, (char *name));
|
||||
int main(int argc, char **argv);
|
||||
void size(char *name);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#define NODAY (-2)
|
||||
char CRONPID[] = "/usr/run/cron.pid";
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv, char **envp));
|
||||
_PROTOTYPE(int getltim, (char *t));
|
||||
_PROTOTYPE(int getlday, (char *m, char *d));
|
||||
_PROTOTYPE(int digitstring, (char *s));
|
||||
int main(int argc, char **argv, char **envp);
|
||||
int getltim(char *t);
|
||||
int getlday(char *m, char *d);
|
||||
int digitstring(char *s);
|
||||
|
||||
int main(argc, argv, envp)
|
||||
int argc;
|
||||
|
|
|
@ -71,19 +71,19 @@ int dflag, jflag, mflag, nflag, oflag, rflag, sflag, tflag, vflag, zflag;
|
|||
extern int errno;
|
||||
extern char **environ;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void maketarget, (char *dir2));
|
||||
_PROTOTYPE(int make_dir, (char *dir));
|
||||
_PROTOTYPE(int stat_all, (char *dir1, int n));
|
||||
_PROTOTYPE(void sort_dir, (int m));
|
||||
_PROTOTYPE(void process, (int m, char *dir1, char *dir2));
|
||||
_PROTOTYPE(void swap, (struct sorted *sp1, struct sorted *sp2));
|
||||
_PROTOTYPE(int copy, (char *dir1, struct sorted *sp, char *cbuf2));
|
||||
_PROTOTYPE(int zcopy, (char *src, char *targ));
|
||||
_PROTOTYPE(void copydir, (char *dir1, char *dir2, char *namep));
|
||||
_PROTOTYPE(void newdisk, (char *dir));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void error, (int type, char *s1, char *s2, char *s3));
|
||||
int main(int argc, char **argv);
|
||||
void maketarget(char *dir2);
|
||||
int make_dir(char *dir);
|
||||
int stat_all(char *dir1, int n);
|
||||
void sort_dir(int m);
|
||||
void process(int m, char *dir1, char *dir2);
|
||||
void swap(struct sorted *sp1, struct sorted *sp2);
|
||||
int copy(char *dir1, struct sorted *sp, char *cbuf2);
|
||||
int zcopy(char *src, char *targ);
|
||||
void copydir(char *dir1, char *dir2, char *namep);
|
||||
void newdisk(char *dir);
|
||||
void usage(void);
|
||||
void error(int type, char *s1, char *s2, char *s3);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -39,22 +39,22 @@
|
|||
#define EXTERN extern
|
||||
#include "mfs/super.h"
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void get_super, (void));
|
||||
_PROTOTYPE(void rw_inode, (struct stat * stat_ptr, int rw_mode));
|
||||
_PROTOTYPE(void get_inode, (struct stat * stat_ptr));
|
||||
_PROTOTYPE(void put_inode, (struct stat * stat_ptr));
|
||||
_PROTOTYPE(long rd_cmdline, (int argc, char *argv[]));
|
||||
_PROTOTYPE(void modify, (int nr_blocks));
|
||||
_PROTOTYPE(void save_blk, (block_t blk_num));
|
||||
_PROTOTYPE(void reset_blks, (void));
|
||||
_PROTOTYPE(void show_blks, (void));
|
||||
_PROTOTYPE(int blk_is_used, (block_t blk_num));
|
||||
_PROTOTYPE(int blk_ok, (block_t num));
|
||||
_PROTOTYPE(void set_bit, (zone_t num));
|
||||
_PROTOTYPE(long rd_num, (void));
|
||||
_PROTOTYPE(int ok, (char *str));
|
||||
_PROTOTYPE(void done, (int nr));
|
||||
int main(int argc, char **argv);
|
||||
void get_super(void);
|
||||
void rw_inode(struct stat * stat_ptr, int rw_mode);
|
||||
void get_inode(struct stat * stat_ptr);
|
||||
void put_inode(struct stat * stat_ptr);
|
||||
long rd_cmdline(int argc, char *argv[]);
|
||||
void modify(int nr_blocks);
|
||||
void save_blk(block_t blk_num);
|
||||
void reset_blks(void);
|
||||
void show_blks(void);
|
||||
int blk_is_used(block_t blk_num);
|
||||
int blk_ok(block_t num);
|
||||
void set_bit(zone_t num);
|
||||
long rd_num(void);
|
||||
int ok(char *str);
|
||||
void done(int nr);
|
||||
|
||||
/* Super block table.
|
||||
*
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
char *glyphs[] = {
|
||||
" @@@ @@ @@ @ @ @@@@@ @@ @@@ ",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#define EOS '\0'
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -33,16 +33,16 @@ char *monthname[] = {
|
|||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void doyear, (int year));
|
||||
_PROTOTYPE(void domonth, (int year, int month));
|
||||
_PROTOTYPE(void output, (int nmonths));
|
||||
_PROTOTYPE(void calendar, (int year, int month, int indx));
|
||||
_PROTOTYPE(void usage, (char *s));
|
||||
_PROTOTYPE(int date, (int year, int month, int week, int wday));
|
||||
_PROTOTYPE(void setmonth, (int year, int month));
|
||||
_PROTOTYPE(int getdate, (int week, int wday));
|
||||
_PROTOTYPE(static int Jan1, (int year));
|
||||
int main(int argc, char **argv);
|
||||
void doyear(int year);
|
||||
void domonth(int year, int month);
|
||||
void output(int nmonths);
|
||||
void calendar(int year, int month, int indx);
|
||||
void usage(char *s);
|
||||
int date(int year, int month, int week, int wday);
|
||||
void setmonth(int year, int month);
|
||||
int getdate(int week, int wday);
|
||||
static int Jan1(int year);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/* The <minix/ansi.h> header attempts to decide whether the compiler has enough
|
||||
* conformance to Standard C for Minix to take advantage of. If so, the
|
||||
* symbol _ANSI is defined (as 31415). Otherwise _ANSI is not defined
|
||||
* here, but it may be defined by applications that want to bend the rules.
|
||||
* The magic number in the definition is to inhibit unnecessary bending
|
||||
* of the rules. (For consistency with the new '#ifdef _ANSI" tests in
|
||||
* the headers, _ANSI should really be defined as nothing, but that would
|
||||
* break many library routines that use "#if _ANSI".)
|
||||
|
||||
* If _ANSI ends up being defined, a macro
|
||||
*
|
||||
* _PROTOTYPE(function, params)
|
||||
*
|
||||
* is defined. This macro expands in different ways, generating either
|
||||
* ANSI Standard C prototypes or old-style K&R (Kernighan & Ritchie)
|
||||
* prototypes, as needed. Finally, some programs use _CONST, _VOIDSTAR etc
|
||||
* in such a way that they are portable over both ANSI and K&R compilers.
|
||||
* The appropriate macros are defined here.
|
||||
*/
|
||||
|
||||
#ifndef _MINIX_ANSI_H
|
||||
#define _MINIX_ANSI_H
|
||||
|
||||
#if __STDC__ == 1
|
||||
#define _ANSI 31459 /* compiler claims full ANSI conformance */
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _ANSI 31459 /* gcc conforms enough even in non-ANSI mode */
|
||||
#endif
|
||||
|
||||
#ifdef _ANSI
|
||||
|
||||
/* Keep everything for ANSI prototypes. */
|
||||
#define _PROTOTYPE(function, params) function params
|
||||
|
||||
#define _VOIDSTAR void *
|
||||
#define _VOID void
|
||||
#define _CONST const
|
||||
#define _VOLATILE volatile
|
||||
#define _SIZET size_t
|
||||
|
||||
#else
|
||||
|
||||
/* Throw away the parameters for K&R prototypes. */
|
||||
#define _PROTOTYPE(function, params) function()
|
||||
|
||||
#define _VOIDSTAR void *
|
||||
#define _VOID void
|
||||
#define _CONST
|
||||
#define _VOLATILE
|
||||
#define _SIZET int
|
||||
|
||||
#endif /* _ANSI */
|
||||
|
||||
#endif /* _MINIX_ANSI_H */
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "ansi.h"
|
||||
#include <minix/ansi.h>
|
||||
|
||||
#define MAXLL 2048 /* ridiculous maximum line length */
|
||||
|
||||
|
@ -53,7 +53,7 @@ char *Pname; /* program name */
|
|||
unsigned char Ulb[MAXLL]; /* underline buffer */
|
||||
int Ulx = 0; /* underline buffer index */
|
||||
|
||||
_PROTOTYPE(void Putchar,(int ch));
|
||||
void Putchar(int ch);
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -31,9 +31,8 @@
|
|||
#include "cawf.h"
|
||||
#include <ctype.h>
|
||||
|
||||
_PROTOTYPE(static unsigned char *Convstr,(char *s, int *len));
|
||||
_PROTOTYPE(static int Convfont,(char *nm, char *s, char **fn,
|
||||
unsigned char **fi));
|
||||
static unsigned char *Convstr(char *s, int *len);
|
||||
static int Convfont(char *nm, char *s, char **fn, unsigned char **fi);
|
||||
|
||||
#ifndef UNIX
|
||||
#define strcasecmp strcmpi
|
||||
|
|
|
@ -36,32 +36,32 @@
|
|||
* Prototypes for request processing functions.
|
||||
*/
|
||||
|
||||
_PROTOTYPE(static void nr_UL,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_Ub,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_Uc,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_Uf,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_Ur,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_ad,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_bp,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_br,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_ce,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_di,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_ds,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_fi,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_fl,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_ft,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_it,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_na,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_nf,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_ns,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_rm,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_rn,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_rr,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_rs,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_tm,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(static void nr_tr,(unsigned char *line, int brk));
|
||||
static void nr_UL(unsigned char *line, int brk);
|
||||
static void nr_Ub(unsigned char *line, int brk);
|
||||
static void nr_Uc(unsigned char *line, int brk);
|
||||
static void nr_Uf(unsigned char *line, int brk);
|
||||
static void nr_Ur(unsigned char *line, int brk);
|
||||
static void nr_ad(unsigned char *line, int brk);
|
||||
static void nr_bp(unsigned char *line, int brk);
|
||||
static void nr_br(unsigned char *line, int brk);
|
||||
static void nr_ce(unsigned char *line, int brk);
|
||||
static void nr_di(unsigned char *line, int brk);
|
||||
static void nr_ds(unsigned char *line, int brk);
|
||||
static void nr_fi(unsigned char *line, int brk);
|
||||
static void nr_fl(unsigned char *line, int brk);
|
||||
static void nr_ft(unsigned char *line, int brk);
|
||||
static void nr_it(unsigned char *line, int brk);
|
||||
static void nr_na(unsigned char *line, int brk);
|
||||
static void nr_nf(unsigned char *line, int brk);
|
||||
static void nr_ns(unsigned char *line, int brk);
|
||||
static void nr_rm(unsigned char *line, int brk);
|
||||
static void nr_rn(unsigned char *line, int brk);
|
||||
static void nr_rr(unsigned char *line, int brk);
|
||||
static void nr_rs(unsigned char *line, int brk);
|
||||
static void nr_tm(unsigned char *line, int brk);
|
||||
static void nr_tr(unsigned char *line, int brk);
|
||||
|
||||
_PROTOTYPE(static void nr_nil,(unsigned char *line, int brk));
|
||||
static void nr_nil(unsigned char *line, int brk);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* 4. This notice may not be removed or altered.
|
||||
*/
|
||||
|
||||
#include "ansi.h"
|
||||
#include <minix/ansi.h>
|
||||
|
||||
#ifdef UNIX
|
||||
# ifdef USG
|
||||
|
@ -66,51 +66,51 @@
|
|||
#include <malloc.h>
|
||||
# endif /* UNIX */
|
||||
#else /* not STDLIB */
|
||||
_PROTOTYPE(char *getenv,(char *name));
|
||||
char *getenv(char *name);
|
||||
# ifdef UNIX
|
||||
# ifdef MALLOCH
|
||||
#include <malloc.h>
|
||||
# else /* not MALLOCH */
|
||||
_PROTOTYPE(char *malloc,(unsigned size));
|
||||
char *malloc(unsigned size);
|
||||
# endif /* MALLOCH */
|
||||
# else /* not UNIX */
|
||||
#include <malloc.h>
|
||||
# endif /* UNIX */
|
||||
#endif /* STDLIB */
|
||||
|
||||
_PROTOTYPE(unsigned char *Asmcode,(unsigned char **s, unsigned char *c));
|
||||
_PROTOTYPE(int Asmname,(unsigned char *s, unsigned char *c));
|
||||
_PROTOTYPE(void Charput,(int c));
|
||||
_PROTOTYPE(int Delmacro,(int mx));
|
||||
_PROTOTYPE(int Defdev,());
|
||||
_PROTOTYPE(void Delstr,(int sx));
|
||||
_PROTOTYPE(void Error,(int t, int l, char *s1, char *s2));
|
||||
_PROTOTYPE(void Error3,(int len, char *word, char *sarg, int narg, char *msg));
|
||||
_PROTOTYPE(void Expand,(unsigned char *line));
|
||||
_PROTOTYPE(void Delnum,(int nx));
|
||||
_PROTOTYPE(unsigned char *Field,(int n, unsigned char *p, int c));
|
||||
_PROTOTYPE(void Endword,());
|
||||
_PROTOTYPE(int Findchar,(unsigned char *nm, int l, unsigned char *s, int e));
|
||||
_PROTOTYPE(int Findhy,(unsigned char *s, int l, int e));
|
||||
_PROTOTYPE(int Findmacro,(unsigned char *p, int e));
|
||||
_PROTOTYPE(int Findnum,(unsigned char *n, int v, int e));
|
||||
_PROTOTYPE(int Findparms,(unsigned char *n));
|
||||
_PROTOTYPE(int Findscale,(int n, double v, int e));
|
||||
_PROTOTYPE(unsigned char *Findstr,(unsigned char *nm, unsigned char *s, int e));
|
||||
_PROTOTYPE(int LenprtHF,(unsigned char *s, int p, int t));
|
||||
_PROTOTYPE(int main,(int argc, char *argv[]));
|
||||
_PROTOTYPE(void Macro,(unsigned char *inp));
|
||||
_PROTOTYPE(void Nreq,(unsigned char *line, int brk));
|
||||
_PROTOTYPE(void Free,(unsigned char **p));
|
||||
_PROTOTYPE(unsigned char *Newstr,(unsigned char *s));
|
||||
_PROTOTYPE(void Pass2,(unsigned char *line));
|
||||
_PROTOTYPE(void Pass3,(int len, unsigned char *word, unsigned char *sarg, int narg));
|
||||
_PROTOTYPE(void regerror,(char *s));
|
||||
_PROTOTYPE(unsigned char *reg,(int paren, int *flagp));
|
||||
_PROTOTYPE(unsigned char *regatom,(int *flagp));
|
||||
_PROTOTYPE(unsigned char *regbranch,(int *flagp));
|
||||
_PROTOTYPE(regexp *regcomp,(char *exp));
|
||||
_PROTOTYPE(void regdump,(regexp *r));
|
||||
_PROTOTYPE(int regexec,(regexp *prog, unsigned char *string));
|
||||
_PROTOTYPE(void Stringput,(unsigned char *s));
|
||||
_PROTOTYPE(int Str2word,(unsigned char *s, int len));
|
||||
unsigned char *Asmcode(unsigned char **s, unsigned char *c);
|
||||
int Asmname(unsigned char *s, unsigned char *c);
|
||||
void Charput(int c);
|
||||
int Delmacro(int mx);
|
||||
int Defdev();
|
||||
void Delstr(int sx);
|
||||
void Error(int t, int l, char *s1, char *s2);
|
||||
void Error3(int len, char *word, char *sarg, int narg, char *msg);
|
||||
void Expand(unsigned char *line);
|
||||
void Delnum(int nx);
|
||||
unsigned char *Field(int n, unsigned char *p, int c);
|
||||
void Endword();
|
||||
int Findchar(unsigned char *nm, int l, unsigned char *s, int e);
|
||||
int Findhy(unsigned char *s, int l, int e);
|
||||
int Findmacro(unsigned char *p, int e);
|
||||
int Findnum(unsigned char *n, int v, int e);
|
||||
int Findparms(unsigned char *n);
|
||||
int Findscale(int n, double v, int e);
|
||||
unsigned char *Findstr(unsigned char *nm, unsigned char *s, int e);
|
||||
int LenprtHF(unsigned char *s, int p, int t);
|
||||
int main(int argc, char *argv[]);
|
||||
void Macro(unsigned char *inp);
|
||||
void Nreq(unsigned char *line, int brk);
|
||||
void Free(unsigned char **p);
|
||||
unsigned char *Newstr(unsigned char *s);
|
||||
void Pass2(unsigned char *line);
|
||||
void Pass3(int len, unsigned char *word, unsigned char *sarg, int narg);
|
||||
void regerror(char *s);
|
||||
unsigned char *reg(int paren, int *flagp);
|
||||
unsigned char *regatom(int *flagp);
|
||||
unsigned char *regbranch(int *flagp);
|
||||
regexp *regcomp(char *exp);
|
||||
void regdump(regexp *r);
|
||||
int regexec(regexp *prog, unsigned char *string);
|
||||
void Stringput(unsigned char *s);
|
||||
int Str2word(unsigned char *s, int len);
|
||||
|
|
|
@ -164,23 +164,23 @@ STATIC long regsize; /* Code size. */
|
|||
/*
|
||||
* Forward declarations for regcomp()'s friends.
|
||||
*/
|
||||
_PROTOTYPE(STATIC unsigned char *reg, (int paren, int *flagp ));
|
||||
_PROTOTYPE(STATIC unsigned char *regbranch, (int *flagp ));
|
||||
_PROTOTYPE(STATIC unsigned char *regpiece, (int *flagp ));
|
||||
_PROTOTYPE(STATIC unsigned char *regatom, (int *flagp ));
|
||||
_PROTOTYPE(STATIC unsigned char *regnode, (int op ));
|
||||
_PROTOTYPE(STATIC void regc, (int b ));
|
||||
_PROTOTYPE(STATIC void reginsert, (int op, unsigned char *opnd ));
|
||||
_PROTOTYPE(STATIC void regtail, (unsigned char *p, unsigned char *val ));
|
||||
_PROTOTYPE(STATIC void regoptail, (unsigned char *p, unsigned char *val ));
|
||||
_PROTOTYPE(STATIC int regtry, (regexp *prog, unsigned char *string ));
|
||||
_PROTOTYPE(STATIC int regmatch, (unsigned char *prog ));
|
||||
_PROTOTYPE(STATIC int regrepeat, (unsigned char *p ));
|
||||
_PROTOTYPE(STATIC unsigned char *regnext, (unsigned char *p ));
|
||||
_PROTOTYPE(STATIC unsigned char *regprop, (unsigned char *op ));
|
||||
STATIC unsigned char *reg(int paren, int *flagp );
|
||||
STATIC unsigned char *regbranch(int *flagp );
|
||||
STATIC unsigned char *regpiece(int *flagp );
|
||||
STATIC unsigned char *regatom(int *flagp );
|
||||
STATIC unsigned char *regnode(int op );
|
||||
STATIC void regc(int b );
|
||||
STATIC void reginsert(int op, unsigned char *opnd );
|
||||
STATIC void regtail(unsigned char *p, unsigned char *val );
|
||||
STATIC void regoptail(unsigned char *p, unsigned char *val );
|
||||
STATIC int regtry(regexp *prog, unsigned char *string );
|
||||
STATIC int regmatch(unsigned char *prog );
|
||||
STATIC int regrepeat(unsigned char *p );
|
||||
STATIC unsigned char *regnext(unsigned char *p );
|
||||
STATIC unsigned char *regprop(unsigned char *op );
|
||||
|
||||
#ifdef STRCSPN
|
||||
_PROTOTYPE(STATIC int strcspn, (unsigned char *s1, unsigned char *s2 ));
|
||||
STATIC int strcspn(unsigned char *s1, unsigned char *s2 );
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "cawf.h"
|
||||
#include <ctype.h>
|
||||
|
||||
_PROTOTYPE(static void Setroman,());
|
||||
static void Setroman();
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -39,8 +39,8 @@ int rflag, errors;
|
|||
struct stat st;
|
||||
char path[PATH_MAX + 1];
|
||||
|
||||
_PROTOTYPE(int do_change, (char *name));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int do_change(char *name);
|
||||
void usage(void);
|
||||
|
||||
/* Parse a P1003.2 4.7.7-conformant symbolic mode. */
|
||||
mode_t parsemode(const char *symbolic, mode_t oldmode)
|
||||
|
|
|
@ -36,9 +36,9 @@ char *pgmname, path[PATH_MAX + 1];
|
|||
uid_t nuid;
|
||||
gid_t ngid;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void do_chown, (char *file));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void do_chown(char *file);
|
||||
void usage(void);
|
||||
|
||||
/* Main module. If chown(1) is invoked as chgrp(1), the behaviour is nearly
|
||||
* identical, except that the default when a single name is given as an
|
||||
|
|
|
@ -46,15 +46,15 @@ struct stat stb1, stb2; /* stat buffers for size compare */
|
|||
char original[] = "/tmp/cioXXXXXX"; /* previous revision */
|
||||
char diffout[] = "/tmp/cidXXXXXX"; /* diffs */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void rundiff, (void));
|
||||
_PROTOTYPE(void logmsg, (FILE *fp));
|
||||
_PROTOTYPE(void fname, (char *src, char *dst));
|
||||
_PROTOTYPE(void svcname, (char *src, char *dst));
|
||||
_PROTOTYPE(int lockcheck, (FILE *fp, int rev));
|
||||
_PROTOTYPE(void onintr, (int dummy));
|
||||
_PROTOTYPE(void clean, (void));
|
||||
_PROTOTYPE(char *whoami, (void));
|
||||
int main(int argc, char **argv);
|
||||
void rundiff(void);
|
||||
void logmsg(FILE *fp);
|
||||
void fname(char *src, char *dst);
|
||||
void svcname(char *src, char *dst);
|
||||
int lockcheck(FILE *fp, int rev);
|
||||
void onintr(int dummy);
|
||||
void clean(void);
|
||||
char *whoami(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -71,9 +71,9 @@ unsigned long crctab[] = {
|
|||
0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
|
||||
};
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void crc, (int fd, char *name));
|
||||
_PROTOTYPE(unsigned long strncrc, (unsigned char *b, int n, unsigned long s));
|
||||
int main(int argc, char **argv);
|
||||
void crc(int fd, char *name);
|
||||
unsigned long strncrc(unsigned char *b, int n, unsigned long s);
|
||||
|
||||
static int aux;
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
_PROTOTYPE(void fatal, (char *label));
|
||||
_PROTOTYPE(int cmp, (int fd1, int fd2));
|
||||
_PROTOTYPE(void Usage, (void));
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
void fatal(char *label);
|
||||
int cmp(int fd1, int fd2);
|
||||
void Usage(void);
|
||||
int main(int argc, char **argv);
|
||||
|
||||
#define BLOCK 4096
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@ char *base; /* basename of file */
|
|||
|
||||
char difftemp[PATHLEN]; /* extract() fix/patch input */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void fname, (char *src, char *dst));
|
||||
_PROTOTYPE(void svcname, (char *src, char *dst));
|
||||
_PROTOTYPE(void extract, (char *script, char *out, int rev));
|
||||
_PROTOTYPE(char *basename, (char *name));
|
||||
_PROTOTYPE(char *whoami, (void));
|
||||
_PROTOTYPE(int getyn, (void));
|
||||
int main(int argc, char **argv);
|
||||
void fname(char *src, char *dst);
|
||||
void svcname(char *src, char *dst);
|
||||
void extract(char *script, char *out, int rev);
|
||||
char *basename(char *name);
|
||||
char *whoami(void);
|
||||
int getyn(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -37,15 +37,15 @@ int colflgs[3] = {1, 2, 3}; /* number of tabs + 1: 0 => no column */
|
|||
|
||||
static char *umsg = "Usage: comm [-[123]] file1 file2\n";
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void error, (char *s, char *f));
|
||||
_PROTOTYPE(void eopen, (char *fn, struct file *file));
|
||||
_PROTOTYPE(int getbuf, (struct file *file));
|
||||
_PROTOTYPE(int readline, (int fno));
|
||||
_PROTOTYPE(void comm, (void));
|
||||
_PROTOTYPE(void putcol, (int col, char *buf));
|
||||
_PROTOTYPE(void cpycol, (int col));
|
||||
int main(int argc, char **argv);
|
||||
void usage(void);
|
||||
void error(char *s, char *f);
|
||||
void eopen(char *fn, struct file *file);
|
||||
int getbuf(struct file *file);
|
||||
int readline(int fno);
|
||||
void comm(void);
|
||||
void putcol(int col, char *buf);
|
||||
void cpycol(int col);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -218,22 +218,22 @@ count_int fsize;
|
|||
code_int free_ent = 0; /* first unused entry */
|
||||
int exit_stat = 0;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void Usage, (void));
|
||||
_PROTOTYPE(void compress, (void));
|
||||
_PROTOTYPE(void onintr, (int dummy));
|
||||
_PROTOTYPE(void oops, (int dummy));
|
||||
_PROTOTYPE(void output, (code_int code));
|
||||
_PROTOTYPE(int foreground, (void));
|
||||
_PROTOTYPE(void decompress, (void));
|
||||
_PROTOTYPE(code_int getcode, (void));
|
||||
_PROTOTYPE(void writeerr, (void));
|
||||
_PROTOTYPE(void copystat, (char *ifname, char *ofname));
|
||||
_PROTOTYPE(int foreground, (void));
|
||||
_PROTOTYPE(void cl_block , (void));
|
||||
_PROTOTYPE(void cl_hash, (count_int hsize));
|
||||
_PROTOTYPE(void prratio, (FILE *stream, long int num, long int den));
|
||||
_PROTOTYPE(void version, (void));
|
||||
int main(int argc, char **argv);
|
||||
void Usage(void);
|
||||
void compress(void);
|
||||
void onintr(int dummy);
|
||||
void oops(int dummy);
|
||||
void output(code_int code);
|
||||
int foreground(void);
|
||||
void decompress(void);
|
||||
code_int getcode(void);
|
||||
void writeerr(void);
|
||||
void copystat(char *ifname, char *ofname);
|
||||
int foreground(void);
|
||||
void cl_block(void);
|
||||
void cl_hash(count_int hsize);
|
||||
void prratio(FILE *stream, long int num, long int den);
|
||||
void version(void);
|
||||
|
||||
void Usage() {
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
|
||||
char *pch, *errorp;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(BOOLEAN is, (char *pc));
|
||||
_PROTOTYPE(int num, (void));
|
||||
_PROTOTYPE(void puto, (void));
|
||||
_PROTOTYPE(void statistics, (void));
|
||||
_PROTOTYPE(int ulcase, (int c));
|
||||
_PROTOTYPE(void cnull, (int c));
|
||||
_PROTOTYPE(void null, (int c));
|
||||
_PROTOTYPE(void extra, (void));
|
||||
_PROTOTYPE(void over, (int dummy));
|
||||
int main(int argc, char **argv);
|
||||
BOOLEAN is(char *pc);
|
||||
int num(void);
|
||||
void puto(void);
|
||||
void statistics(void);
|
||||
int ulcase(int c);
|
||||
void cnull(int c);
|
||||
void null(int c);
|
||||
void extra(void);
|
||||
void over(int dummy);
|
||||
|
||||
BOOLEAN is(pc)
|
||||
char *pc;
|
||||
|
|
|
@ -110,14 +110,14 @@ int maxbits; /* limit on number of bits */
|
|||
int clearflg; /* if set, allow CLEAR */
|
||||
int inmod; /* mod 8 for getbits() */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void ffork, (void));
|
||||
_PROTOTYPE(void die, (char *s));
|
||||
_PROTOTYPE(void myputc, (unsigned c));
|
||||
_PROTOTYPE(unsigned mygetc, (void));
|
||||
_PROTOTYPE(void getbits, (void));
|
||||
_PROTOTYPE(void getpipe, (void));
|
||||
_PROTOTYPE(void putpipe, (unsigned u, int flag));
|
||||
int main(int argc, char **argv);
|
||||
void ffork(void);
|
||||
void die(char *s);
|
||||
void myputc(unsigned c);
|
||||
unsigned mygetc(void);
|
||||
void getbits(void);
|
||||
void getpipe(void);
|
||||
void putpipe(unsigned u, int flag);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -191,29 +191,24 @@ typedef int boolean;
|
|||
#include <sys/times.h>
|
||||
#endif
|
||||
|
||||
#ifndef _PROTOTYPE
|
||||
#define _PROTOTYPE(fun, args) fun args
|
||||
#endif
|
||||
int main(void);
|
||||
void prep_timer(void);
|
||||
void timeout(int sig);
|
||||
void Proc0(void);
|
||||
void Proc1(RecordPtr PtrParIn);
|
||||
void Proc2(OneToFifty *IntParIO);
|
||||
void Proc3(RecordPtr *PtrParOut);
|
||||
void Proc4(void);
|
||||
void Proc5(void);
|
||||
void Proc6(Enumeration EnumParIn, Enumeration *EnumParOut);
|
||||
void Proc7(OneToFifty IntParI1, OneToFifty IntParI2, OneToFifty
|
||||
*IntParOut);
|
||||
void Proc8(Array1Dim Array1Par, Array2Dim Array2Par, OneToFifty
|
||||
IntParI1, OneToFifty IntParI2);
|
||||
boolean Func2(String30 StrParI1, String30 StrParI2);
|
||||
boolean Func3(Enumeration EnumParIn);
|
||||
|
||||
_PROTOTYPE(int main, (void));
|
||||
_PROTOTYPE(void prep_timer, (void));
|
||||
_PROTOTYPE(void timeout, (int sig));
|
||||
_PROTOTYPE(void Proc0, (void));
|
||||
_PROTOTYPE(void Proc1, (RecordPtr PtrParIn));
|
||||
_PROTOTYPE(void Proc2, (OneToFifty *IntParIO));
|
||||
_PROTOTYPE(void Proc3, (RecordPtr *PtrParOut));
|
||||
_PROTOTYPE(void Proc4, (void));
|
||||
_PROTOTYPE(void Proc5, (void));
|
||||
_PROTOTYPE(void Proc6, (Enumeration EnumParIn, Enumeration *EnumParOut));
|
||||
_PROTOTYPE(void Proc7, (OneToFifty IntParI1, OneToFifty IntParI2,
|
||||
OneToFifty *IntParOut));
|
||||
_PROTOTYPE(void Proc8, (Array1Dim Array1Par, Array2Dim Array2Par,
|
||||
OneToFifty IntParI1, OneToFifty IntParI2));
|
||||
/*_PROTOTYPE(Enumeration Func1,(CapitalLetter CharPar1, CapitalLetter CharPar2));*/
|
||||
_PROTOTYPE(boolean Func2, (String30 StrParI1, String30 StrParI2));
|
||||
_PROTOTYPE(boolean Func3, (Enumeration EnumParIn));
|
||||
|
||||
_PROTOTYPE(Enumeration Func1, (int CharPar1, int CharPar2));
|
||||
Enumeration Func1(int CharPar1, int CharPar2);
|
||||
|
||||
|
||||
int main()
|
||||
|
|
|
@ -117,31 +117,33 @@ static unsigned int cache_size;
|
|||
|
||||
|
||||
/* Prototypes. */
|
||||
_PROTOTYPE(void usage, (char *prog_name) );
|
||||
_PROTOTYPE(unsigned c2u2, (unsigned char *ucarray) );
|
||||
_PROTOTYPE(unsigned long c4u4, (unsigned char *ucarray) );
|
||||
_PROTOTYPE(void determine, (void));
|
||||
_PROTOTYPE(int main, (int argc, char *argv []));
|
||||
_PROTOTYPE(DIRECTORY *directory, (DIRECTORY *dir, int entries, BOOL function, char *pathname) );
|
||||
_PROTOTYPE(void extract, (DIRECTORY *entry) );
|
||||
_PROTOTYPE(void make_file, (DIRECTORY *dir_ptr, int entries, char *name) );
|
||||
_PROTOTYPE(void fill_date, (DIRECTORY *entry) );
|
||||
_PROTOTYPE(char *make_name, (DIRECTORY *dir_ptr, int dir_fl) );
|
||||
_PROTOTYPE(int fill, (char *buffer, size_t size) );
|
||||
_PROTOTYPE(void xmodes, (int mode) );
|
||||
_PROTOTYPE(void show, (DIRECTORY *dir_ptr, char *name) );
|
||||
_PROTOTYPE(void free_blocks, (void));
|
||||
_PROTOTYPE(DIRECTORY *read_cluster, (unsigned int cluster) );
|
||||
_PROTOTYPE(unsigned short free_cluster, (BOOL leave_fl) );
|
||||
_PROTOTYPE(void link_fat, (unsigned int cl_1, unsigned int cl_2) );
|
||||
_PROTOTYPE(unsigned short next_cluster, (unsigned int cl_no) );
|
||||
_PROTOTYPE(char *slash, (char *str) );
|
||||
_PROTOTYPE(void add_path, (char *file, BOOL slash_fl) );
|
||||
_PROTOTYPE(void disk_io, (BOOL op, unsigned long seek, void *address, unsigned bytes) );
|
||||
_PROTOTYPE(void flush_fat, (void));
|
||||
_PROTOTYPE(void read_fat, (unsigned int cl_no));
|
||||
_PROTOTYPE(BOOL free_range, (unsigned short *first, unsigned short *last));
|
||||
_PROTOTYPE(long lmin, (long a, long b));
|
||||
void usage(char *prog_name);
|
||||
unsigned c2u2(unsigned char *ucarray);
|
||||
unsigned long c4u4(unsigned char *ucarray);
|
||||
void determine(void);
|
||||
int main(int argc, char *argv []);
|
||||
DIRECTORY *directory(DIRECTORY *dir, int entries, BOOL function, char
|
||||
*pathname);
|
||||
void extract(DIRECTORY *entry);
|
||||
void make_file(DIRECTORY *dir_ptr, int entries, char *name);
|
||||
void fill_date(DIRECTORY *entry);
|
||||
char *make_name(DIRECTORY *dir_ptr, int dir_fl);
|
||||
int fill(char *buffer, size_t size);
|
||||
void xmodes(int mode);
|
||||
void show(DIRECTORY *dir_ptr, char *name);
|
||||
void free_blocks(void);
|
||||
DIRECTORY *read_cluster(unsigned int cluster);
|
||||
unsigned short free_cluster(BOOL leave_fl);
|
||||
void link_fat(unsigned int cl_1, unsigned int cl_2);
|
||||
unsigned short next_cluster(unsigned int cl_no);
|
||||
char *slash(char *str);
|
||||
void add_path(char *file, BOOL slash_fl);
|
||||
void disk_io(BOOL op, unsigned long seek, void *address, unsigned
|
||||
bytes);
|
||||
void flush_fat(void);
|
||||
void read_fat(unsigned int cl_no);
|
||||
BOOL free_range(unsigned short *first, unsigned short *last);
|
||||
long lmin(long a, long b);
|
||||
|
||||
|
||||
void usage(prog_name)
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
int column = 0; /* Current column, retained between files */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void Expand, (FILE *f, int tab_index, int tabs []));
|
||||
int main(int argc, char **argv);
|
||||
void Expand(FILE *f, int tab_index, int tabs []);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(long first, (long k));
|
||||
int main(int argc, char **argv);
|
||||
long first(long k);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -82,31 +82,31 @@ int ncyl = 1024;
|
|||
int readonly;
|
||||
int override= 0;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char *argv []));
|
||||
_PROTOTYPE(void getgeom, (void));
|
||||
_PROTOTYPE(int getboot, (char *buffer));
|
||||
_PROTOTYPE(int putboot, (char *buffer));
|
||||
_PROTOTYPE(void load_from_file, (void));
|
||||
_PROTOTYPE(void save_to_file, (void));
|
||||
_PROTOTYPE(int dpl_partitions, (int rawflag));
|
||||
_PROTOTYPE(int chk_table, (void));
|
||||
_PROTOTYPE(int sec_to_hst, (long logsec, unsigned char *hd, unsigned char *sec,
|
||||
unsigned char *cyl));
|
||||
_PROTOTYPE(int mark_partition, (struct part_entry *pe));
|
||||
_PROTOTYPE(void change_partition, (struct part_entry *entry));
|
||||
_PROTOTYPE(int get_a_char, (void));
|
||||
_PROTOTYPE(int print_menu, (void));
|
||||
_PROTOTYPE(void adj_base, (struct part_entry *pe));
|
||||
_PROTOTYPE(void adj_size, (struct part_entry *pe));
|
||||
_PROTOTYPE(struct part_entry *ask_partition, (void));
|
||||
_PROTOTYPE(void footnotes, (void));
|
||||
_PROTOTYPE(int get_an_int, (char *prompt, int *intptr));
|
||||
_PROTOTYPE(void list_part_types, (void));
|
||||
_PROTOTYPE(void mark_npartition, (struct part_entry *pe));
|
||||
_PROTOTYPE(int mygets, (char *buf, int length));
|
||||
_PROTOTYPE(char *systype, (int type));
|
||||
_PROTOTYPE(void toggle_active, (struct part_entry *pe));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char *argv []);
|
||||
void getgeom(void);
|
||||
int getboot(char *buffer);
|
||||
int putboot(char *buffer);
|
||||
void load_from_file(void);
|
||||
void save_to_file(void);
|
||||
int dpl_partitions(int rawflag);
|
||||
int chk_table(void);
|
||||
int sec_to_hst(long logsec, unsigned char *hd, unsigned char *sec,
|
||||
unsigned char *cyl);
|
||||
int mark_partition(struct part_entry *pe);
|
||||
void change_partition(struct part_entry *entry);
|
||||
int get_a_char(void);
|
||||
int print_menu(void);
|
||||
void adj_base(struct part_entry *pe);
|
||||
void adj_size(struct part_entry *pe);
|
||||
struct part_entry *ask_partition(void);
|
||||
void footnotes(void);
|
||||
int get_an_int(char *prompt, int *intptr);
|
||||
void list_part_types(void);
|
||||
void mark_npartition(struct part_entry *pe);
|
||||
int mygets(char *buf, int length);
|
||||
char *systype(int type);
|
||||
void toggle_active(struct part_entry *pe);
|
||||
void usage(void);
|
||||
|
||||
/* One featureful master bootstrap. */
|
||||
char bootstrap[] = {
|
||||
|
|
|
@ -65,10 +65,10 @@ struct info {
|
|||
int tabsize = sizeof(table) / sizeof(struct info);
|
||||
int L_flag;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void file, (char *name));
|
||||
_PROTOTYPE(void do_strip, (int type));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void file(char *name);
|
||||
void do_strip(int type);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -42,12 +42,13 @@ char *prog = 0, *processing = 0;
|
|||
/* getline() already declared in stdio.h */
|
||||
#define getline fix_getline
|
||||
#endif
|
||||
_PROTOTYPE(char *getline, (FILE *fp, char *b));
|
||||
_PROTOTYPE(char *range, (char *s, int *p1, int *p2));
|
||||
_PROTOTYPE(int getcommand, (FILE *fp, int *o1, int *o2, char *pcmd, int *n1, int *n2));
|
||||
_PROTOTYPE(void fatal, (const char *s, ...));
|
||||
_PROTOTYPE(int strwcmp, (char *s1, char *s2));
|
||||
_PROTOTYPE(int whitespace, (int ch));
|
||||
char *getline(FILE *fp, char *b);
|
||||
char *range(char *s, int *p1, int *p2);
|
||||
int getcommand(FILE *fp, int *o1, int *o2, char *pcmd, int *n1, int
|
||||
*n2);
|
||||
void fatal(const char *s, ...);
|
||||
int strwcmp(char *s1, char *s2);
|
||||
int whitespace(int ch);
|
||||
|
||||
char *
|
||||
getline(FILE *fp, char *b)
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
int column = 0; /* Current column, retained between files */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void Fold, (FILE *f, int width));
|
||||
int main(int argc, char **argv);
|
||||
void Fold(FILE *f, int width);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
static char *Copyright = "\0Copyright (c) 1990 Bert Reuling";
|
||||
static unsigned long seed;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(unsigned long magic, (unsigned long range));
|
||||
int main(int argc, char **argv);
|
||||
unsigned long magic(unsigned long range);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -154,72 +154,76 @@ int firstlist; /* has the listing header been printed? */
|
|||
unsigned part_offset; /* sector offset for this partition */
|
||||
char answer[] = "Answer questions with y or n. Then hit RETURN";
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void initvars, (void));
|
||||
_PROTOTYPE(void fatal, (char *s));
|
||||
_PROTOTYPE(int eoln, (int c));
|
||||
_PROTOTYPE(int yes, (char *question));
|
||||
_PROTOTYPE(int atoo, (char *s));
|
||||
_PROTOTYPE(int input, (char *buf, int size));
|
||||
_PROTOTYPE(char *alloc, (unsigned nelem, unsigned elsize));
|
||||
_PROTOTYPE(void printname, (char *s));
|
||||
_PROTOTYPE(void printrec, (struct stack *sp));
|
||||
_PROTOTYPE(void printpath, (int mode, int nlcr));
|
||||
_PROTOTYPE(void devopen, (void));
|
||||
_PROTOTYPE(void devclose, (void));
|
||||
_PROTOTYPE(void devio, (block_nr bno, int dir));
|
||||
_PROTOTYPE(void devread, (long block, long offset, char *buf, int size));
|
||||
_PROTOTYPE(void devwrite, (long block, long offset, char *buf, int size));
|
||||
_PROTOTYPE(void pr, (char *fmt, int cnt, char *s, char *p));
|
||||
_PROTOTYPE(void lpr, (char *fmt, long cnt, char *s, char *p));
|
||||
_PROTOTYPE(bit_nr getnumber, (char *s));
|
||||
_PROTOTYPE(char **getlist, (char ***argv, char *type));
|
||||
_PROTOTYPE(void lsuper, (void));
|
||||
int main(int argc, char **argv);
|
||||
void initvars(void);
|
||||
void fatal(char *s);
|
||||
int eoln(int c);
|
||||
int yes(char *question);
|
||||
int atoo(char *s);
|
||||
int input(char *buf, int size);
|
||||
char *alloc(unsigned nelem, unsigned elsize);
|
||||
void printname(char *s);
|
||||
void printrec(struct stack *sp);
|
||||
void printpath(int mode, int nlcr);
|
||||
void devopen(void);
|
||||
void devclose(void);
|
||||
void devio(block_nr bno, int dir);
|
||||
void devread(long block, long offset, char *buf, int size);
|
||||
void devwrite(long block, long offset, char *buf, int size);
|
||||
void pr(char *fmt, int cnt, char *s, char *p);
|
||||
void lpr(char *fmt, long cnt, char *s, char *p);
|
||||
bit_nr getnumber(char *s);
|
||||
char **getlist(char ***argv, char *type);
|
||||
void lsuper(void);
|
||||
#define SUPER_GET 0
|
||||
#define SUPER_PUT 1
|
||||
_PROTOTYPE(void rw_super, (int mode));
|
||||
_PROTOTYPE(void chksuper, (void));
|
||||
_PROTOTYPE(void lsi, (char **clist));
|
||||
_PROTOTYPE(bitchunk_t *allocbitmap, (int nblk));
|
||||
_PROTOTYPE(void loadbitmap, (bitchunk_t *bitmap, block_nr bno, int nblk));
|
||||
_PROTOTYPE(void dumpbitmap, (bitchunk_t *bitmap, block_nr bno, int nblk));
|
||||
_PROTOTYPE(void fillbitmap, (bitchunk_t *bitmap, bit_nr lwb, bit_nr upb, char **list));
|
||||
_PROTOTYPE(void freebitmap, (bitchunk_t *p));
|
||||
_PROTOTYPE(void getbitmaps, (void));
|
||||
_PROTOTYPE(void putbitmaps, (void));
|
||||
_PROTOTYPE(void chkword, (unsigned w1, unsigned w2, bit_nr bit, char *type, int *n, int *report, bit_t));
|
||||
_PROTOTYPE(void chkmap, (bitchunk_t *cmap, bitchunk_t *dmap, bit_nr bit, block_nr blkno, int nblk, char *type));
|
||||
_PROTOTYPE(void chkilist, (void));
|
||||
_PROTOTYPE(void getcount, (void));
|
||||
_PROTOTYPE(void counterror, (ino_t ino));
|
||||
_PROTOTYPE(void chkcount, (void));
|
||||
_PROTOTYPE(void freecount, (void));
|
||||
_PROTOTYPE(void printperm, (mode_t mode, int shift, int special, int overlay));
|
||||
_PROTOTYPE(void list, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int Remove, (dir_struct *dp));
|
||||
_PROTOTYPE(void make_printable_name, (char *dst, char *src, int n));
|
||||
_PROTOTYPE(int chkdots, (ino_t ino, off_t pos, dir_struct *dp, ino_t exp));
|
||||
_PROTOTYPE(int chkname, (ino_t ino, dir_struct *dp));
|
||||
_PROTOTYPE(int chkentry, (ino_t ino, off_t pos, dir_struct *dp));
|
||||
_PROTOTYPE(int chkdirzone, (ino_t ino, d_inode *ip, off_t pos, zone_nr zno));
|
||||
_PROTOTYPE(int chksymlinkzone, (ino_t ino, d_inode *ip, off_t pos,
|
||||
zone_nr zno));
|
||||
_PROTOTYPE(void errzone, (char *mess, zone_nr zno, int level, off_t pos));
|
||||
_PROTOTYPE(int markzone, (zone_nr zno, int level, off_t pos));
|
||||
_PROTOTYPE(int chkindzone, (ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level));
|
||||
_PROTOTYPE(off_t jump, (int level));
|
||||
_PROTOTYPE(int zonechk, (ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level));
|
||||
_PROTOTYPE(int chkzones, (ino_t ino, d_inode *ip, off_t *pos, zone_nr *zlist, int len, int level));
|
||||
_PROTOTYPE(int chkfile, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int chkdirectory, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int chklink, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int chkspecial, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int chkmode, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int chkinode, (ino_t ino, d_inode *ip));
|
||||
_PROTOTYPE(int descendtree, (dir_struct *dp));
|
||||
_PROTOTYPE(void chktree, (void));
|
||||
_PROTOTYPE(void printtotal, (void));
|
||||
_PROTOTYPE(void chkdev, (char *f, char **clist, char **ilist, char **zlist));
|
||||
void rw_super(int mode);
|
||||
void chksuper(void);
|
||||
void lsi(char **clist);
|
||||
bitchunk_t *allocbitmap(int nblk);
|
||||
void loadbitmap(bitchunk_t *bitmap, block_nr bno, int nblk);
|
||||
void dumpbitmap(bitchunk_t *bitmap, block_nr bno, int nblk);
|
||||
void fillbitmap(bitchunk_t *bitmap, bit_nr lwb, bit_nr upb, char
|
||||
**list);
|
||||
void freebitmap(bitchunk_t *p);
|
||||
void getbitmaps(void);
|
||||
void putbitmaps(void);
|
||||
void chkword(unsigned w1, unsigned w2, bit_nr bit, char *type, int *n,
|
||||
int *report, bit_t);
|
||||
void chkmap(bitchunk_t *cmap, bitchunk_t *dmap, bit_nr bit, block_nr
|
||||
blkno, int nblk, char *type);
|
||||
void chkilist(void);
|
||||
void getcount(void);
|
||||
void counterror(ino_t ino);
|
||||
void chkcount(void);
|
||||
void freecount(void);
|
||||
void printperm(mode_t mode, int shift, int special, int overlay);
|
||||
void list(ino_t ino, d_inode *ip);
|
||||
int Remove(dir_struct *dp);
|
||||
void make_printable_name(char *dst, char *src, int n);
|
||||
int chkdots(ino_t ino, off_t pos, dir_struct *dp, ino_t exp);
|
||||
int chkname(ino_t ino, dir_struct *dp);
|
||||
int chkentry(ino_t ino, off_t pos, dir_struct *dp);
|
||||
int chkdirzone(ino_t ino, d_inode *ip, off_t pos, zone_nr zno);
|
||||
int chksymlinkzone(ino_t ino, d_inode *ip, off_t pos, zone_nr zno);
|
||||
void errzone(char *mess, zone_nr zno, int level, off_t pos);
|
||||
int markzone(zone_nr zno, int level, off_t pos);
|
||||
int chkindzone(ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int
|
||||
level);
|
||||
off_t jump(int level);
|
||||
int zonechk(ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level);
|
||||
int chkzones(ino_t ino, d_inode *ip, off_t *pos, zone_nr *zlist, int
|
||||
len, int level);
|
||||
int chkfile(ino_t ino, d_inode *ip);
|
||||
int chkdirectory(ino_t ino, d_inode *ip);
|
||||
int chklink(ino_t ino, d_inode *ip);
|
||||
int chkspecial(ino_t ino, d_inode *ip);
|
||||
int chkmode(ino_t ino, d_inode *ip);
|
||||
int chkinode(ino_t ino, d_inode *ip);
|
||||
int descendtree(dir_struct *dp);
|
||||
void chktree(void);
|
||||
void printtotal(void);
|
||||
void chkdev(char *f, char **clist, char **ilist, char **zlist);
|
||||
|
||||
/* Initialize the variables used by this program. */
|
||||
void initvars()
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include "file.h"
|
||||
#include "net.h"
|
||||
|
||||
_PROTOTYPE(static char *dir, (char *path, int full));
|
||||
_PROTOTYPE(static int asciisize, (int fd, off_t *filesize));
|
||||
_PROTOTYPE(static off_t asciisetsize, (int fd, off_t filesize));
|
||||
_PROTOTYPE(static int cloneit, (char *file, int mode));
|
||||
static char *dir(char *path, int full);
|
||||
static int asciisize(int fd, off_t *filesize);
|
||||
static off_t asciisetsize(int fd, off_t filesize);
|
||||
static int cloneit(char *file, int mode);
|
||||
|
||||
#if (__WORD_SIZE == 4)
|
||||
static char buffer[8192];
|
||||
|
|
|
@ -6,28 +6,28 @@
|
|||
* 01/25/96 Initial Release Michael Temari, <Michael@TemWare.Com>
|
||||
*/
|
||||
|
||||
_PROTOTYPE(int recvfile, (int fd, int fdin));
|
||||
_PROTOTYPE(int sendfile, (int fd, int fdout));
|
||||
_PROTOTYPE(int DOascii, (void));
|
||||
_PROTOTYPE(int DObinary, (void));
|
||||
_PROTOTYPE(int DOblock, (void));
|
||||
_PROTOTYPE(int DOstream, (void));
|
||||
_PROTOTYPE(int DOpwd, (void));
|
||||
_PROTOTYPE(int DOcd, (void));
|
||||
_PROTOTYPE(int DOmkdir, (void));
|
||||
_PROTOTYPE(int DOrmdir, (void));
|
||||
_PROTOTYPE(int DOdelete, (void));
|
||||
_PROTOTYPE(int DOmdtm, (void));
|
||||
_PROTOTYPE(int DOsize, (void));
|
||||
_PROTOTYPE(int DOstat, (void));
|
||||
_PROTOTYPE(int DOlist, (void));
|
||||
_PROTOTYPE(int DOnlst, (void));
|
||||
_PROTOTYPE(int DOretr, (void));
|
||||
_PROTOTYPE(int DOrretr, (void));
|
||||
_PROTOTYPE(int DOMretr, (void));
|
||||
_PROTOTYPE(int DOappe, (void));
|
||||
_PROTOTYPE(int DOstor, (void));
|
||||
_PROTOTYPE(int DOrstor, (void));
|
||||
_PROTOTYPE(int DOstou, (void));
|
||||
_PROTOTYPE(int DOMstor, (void));
|
||||
_PROTOTYPE(int DOclone, (void));
|
||||
int recvfile(int fd, int fdin);
|
||||
int sendfile(int fd, int fdout);
|
||||
int DOascii(void);
|
||||
int DObinary(void);
|
||||
int DOblock(void);
|
||||
int DOstream(void);
|
||||
int DOpwd(void);
|
||||
int DOcd(void);
|
||||
int DOmkdir(void);
|
||||
int DOrmdir(void);
|
||||
int DOdelete(void);
|
||||
int DOmdtm(void);
|
||||
int DOsize(void);
|
||||
int DOstat(void);
|
||||
int DOlist(void);
|
||||
int DOnlst(void);
|
||||
int DOretr(void);
|
||||
int DOrretr(void);
|
||||
int DOMretr(void);
|
||||
int DOappe(void);
|
||||
int DOstor(void);
|
||||
int DOrstor(void);
|
||||
int DOstou(void);
|
||||
int DOMstor(void);
|
||||
int DOclone(void);
|
||||
|
|
|
@ -50,11 +50,11 @@ char reply[1024];
|
|||
#define getline ftp_getline
|
||||
#endif
|
||||
|
||||
_PROTOTYPE(static void makeargs, (char *buff));
|
||||
_PROTOTYPE(int DOver, (void));
|
||||
_PROTOTYPE(int DOhelp, (void));
|
||||
_PROTOTYPE(static int getline, (char *line, int len));
|
||||
_PROTOTYPE(int main, (int argc, char *argv[]));
|
||||
static void makeargs(char *buff);
|
||||
int DOver(void);
|
||||
int DOhelp(void);
|
||||
static int getline(char *line, int len);
|
||||
int main(int argc, char *argv[]);
|
||||
|
||||
|
||||
static void makeargs(buff)
|
||||
|
@ -310,7 +310,7 @@ char junk[10];
|
|||
|
||||
struct commands {
|
||||
char *name;
|
||||
_PROTOTYPE(int (*func), (void));
|
||||
int(*func) (void);
|
||||
};
|
||||
|
||||
static struct commands commands[] = {
|
||||
|
|
|
@ -33,7 +33,7 @@ extern char reply[1024];
|
|||
|
||||
#define MODE_B_EOF 64
|
||||
|
||||
_PROTOTYPE(int readline, (char *prompt, char *buff, int len));
|
||||
_PROTOTYPE(int DOgetreply, (void));
|
||||
_PROTOTYPE(int DOcmdcheck, (void));
|
||||
_PROTOTYPE(int DOcommand, (char *ftpcommand, char *ftparg));
|
||||
int readline(char *prompt, char *buff, int len);
|
||||
int DOgetreply(void);
|
||||
int DOcmdcheck(void);
|
||||
int DOcommand(char *ftpcommand, char *ftparg);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
static char line2[512];
|
||||
|
||||
_PROTOTYPE(static void dodir, (char *path, int full));
|
||||
static void dodir(char *path, int full);
|
||||
|
||||
int DOlpwd()
|
||||
{
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* 01/25/96 Initial Release Michael Temari, <Michael@TemWare.Com>
|
||||
*/
|
||||
|
||||
_PROTOTYPE(int DOlpwd, (void));
|
||||
_PROTOTYPE(int DOlcd, (void));
|
||||
_PROTOTYPE(int DOlmkdir, (void));
|
||||
_PROTOTYPE(int DOlrmdir, (void));
|
||||
_PROTOTYPE(int DOllist, (void));
|
||||
_PROTOTYPE(int DOlnlst, (void));
|
||||
_PROTOTYPE(int DOlshell, (void));
|
||||
int DOlpwd(void);
|
||||
int DOlcd(void);
|
||||
int DOlmkdir(void);
|
||||
int DOlrmdir(void);
|
||||
int DOllist(void);
|
||||
int DOlnlst(void);
|
||||
int DOlshell(void);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "xfer.h"
|
||||
#include "net.h"
|
||||
|
||||
_PROTOTYPE(void donothing, (int sig));
|
||||
void donothing(int sig);
|
||||
|
||||
int ftpcomm_fd;
|
||||
static ipaddr_t myip;
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* 01/25/96 Initial Release Michael Temari, <Michael@TemWare.Com>
|
||||
*/
|
||||
|
||||
_PROTOTYPE(int NETinit, (void));
|
||||
_PROTOTYPE(int DOopen, (void));
|
||||
_PROTOTYPE(int DOclose, (void));
|
||||
_PROTOTYPE(int DOquit, (void));
|
||||
_PROTOTYPE(int DOdata, (char *datacom, char *file, int direction, int fd));
|
||||
int NETinit(void);
|
||||
int DOopen(void);
|
||||
int DOclose(void);
|
||||
int DOquit(void);
|
||||
int DOdata(char *datacom, char *file, int direction, int fd);
|
||||
|
||||
extern int ftpcomm_fd;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "ftp.h"
|
||||
#include "other.h"
|
||||
|
||||
_PROTOTYPE(static int docmdargs, (char *cmd, int fa));
|
||||
static int docmdargs(char *cmd, int fa);
|
||||
|
||||
void FTPinit()
|
||||
{
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
* 01/25/96 Initial Release Michael Temari, <Michael@TemWare.Com>
|
||||
*/
|
||||
|
||||
_PROTOTYPE(void FTPinit, (void));
|
||||
_PROTOTYPE(int DOpass, (void));
|
||||
_PROTOTYPE(int DOuser, (void));
|
||||
_PROTOTYPE(int DOnoop, (void));
|
||||
_PROTOTYPE(int DOpassive, (void));
|
||||
_PROTOTYPE(int DOsyst, (void));
|
||||
_PROTOTYPE(int DOremotehelp, (void));
|
||||
_PROTOTYPE(int DOquote, (void));
|
||||
_PROTOTYPE(int DOsite, (void));
|
||||
void FTPinit(void);
|
||||
int DOpass(void);
|
||||
int DOuser(void);
|
||||
int DOnoop(void);
|
||||
int DOpassive(void);
|
||||
int DOsyst(void);
|
||||
int DOremotehelp(void);
|
||||
int DOquote(void);
|
||||
int DOsite(void);
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include "ftp.h"
|
||||
#include "xfer.h"
|
||||
|
||||
_PROTOTYPE(static int asciisend, (int fd, int fdout));
|
||||
_PROTOTYPE(static int binarysend, (int fd, int fdout));
|
||||
_PROTOTYPE(static int asciirecv, (int fd, int fdin));
|
||||
_PROTOTYPE(static int binaryrecv, (int fd, int fdin));
|
||||
static int asciisend(int fd, int fdout);
|
||||
static int binarysend(int fd, int fdout);
|
||||
static int asciirecv(int fd, int fdin);
|
||||
static int binaryrecv(int fd, int fdin);
|
||||
|
||||
#if (__WORD_SIZE == 4)
|
||||
static char buffer[8192];
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
*
|
||||
*/
|
||||
|
||||
_PROTOTYPE(int recvfile, (int fd, int fdin));
|
||||
_PROTOTYPE(int sendfile, (int fd, int fdout));
|
||||
int recvfile(int fd, int fdin);
|
||||
int sendfile(int fd, int fdout);
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
#define DEFAULT 10
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void do_file, (int n, FILE *f));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void do_file(int n, FILE *f);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -53,18 +53,18 @@ extern int optind;
|
|||
extern char *optarg;
|
||||
|
||||
/* Prototypes. */
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(char fgetarg, (FILE *stream, char *cbuf));
|
||||
_PROTOTYPE(int find, (char *symd));
|
||||
_PROTOTYPE(void defit, (char *sym, int redef, int typed));
|
||||
_PROTOTYPE(void stop, (void));
|
||||
_PROTOTYPE(void gotoeoln, (void));
|
||||
_PROTOTYPE(void prteoln, (void));
|
||||
_PROTOTYPE(void printtable, (void));
|
||||
_PROTOTYPE(char getendif, (void));
|
||||
_PROTOTYPE(void gettable, (void));
|
||||
_PROTOTYPE(void parse, (void));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
char fgetarg(FILE *stream, char *cbuf);
|
||||
int find(char *symd);
|
||||
void defit(char *sym, int redef, int typed);
|
||||
void stop(void);
|
||||
void gotoeoln(void);
|
||||
void prteoln(void);
|
||||
void printtable(void);
|
||||
char getendif(void);
|
||||
void gettable(void);
|
||||
void parse(void);
|
||||
void usage(void);
|
||||
|
||||
#ifdef __STDC__
|
||||
char fgetarg ( FILE *stream , char *cbuf )
|
||||
|
|
|
@ -142,27 +142,27 @@ struct dir_entry
|
|||
#define IS_DIR(PTR) (PTR->flags[-High_Sierra] & 2 ? 1 : 0)
|
||||
|
||||
|
||||
_PROTOTYPE (int main, (int argc, char **argv));
|
||||
_PROTOTYPE (int iso_cmp, (char *name, struct dir_entry *dir_ptr, int dir_flag));
|
||||
_PROTOTYPE (void list_dir, (struct dir_entry *dir_ptr));
|
||||
_PROTOTYPE (void list_file, (struct dir_entry *dir_ptr));
|
||||
_PROTOTYPE (struct dir_entry *look_up, (char *name));
|
||||
_PROTOTYPE (void recurse_dir, (char *path, struct dir_entry *dir_ptr));
|
||||
_PROTOTYPE (void read_device, (long offset, int nr_of_bytes, char *buffer));
|
||||
_PROTOTYPE (int valid_fs, (void) );
|
||||
_PROTOTYPE (void usage, (void) );
|
||||
_PROTOTYPE (void print_date, (char *date));
|
||||
_PROTOTYPE (void print_dir_date, (char *date));
|
||||
_PROTOTYPE (void iso_info, (struct iso9660_descriptor *vol_desc));
|
||||
_PROTOTYPE (void hs_info, (struct high_sierra_descriptor *vol_desc));
|
||||
_PROTOTYPE (int iso_711, (char *c));
|
||||
_PROTOTYPE (int iso_712, (char *c));
|
||||
_PROTOTYPE (int iso_721, (char *c));
|
||||
_PROTOTYPE (int iso_722, (char *c));
|
||||
_PROTOTYPE (int iso_723, (char *c));
|
||||
_PROTOTYPE (long iso_731, (char *c));
|
||||
_PROTOTYPE (long iso_732, (char *c));
|
||||
_PROTOTYPE (long iso_733, (char *c));
|
||||
int main(int argc, char **argv);
|
||||
int iso_cmp(char *name, struct dir_entry *dir_ptr, int dir_flag);
|
||||
void list_dir(struct dir_entry *dir_ptr);
|
||||
void list_file(struct dir_entry *dir_ptr);
|
||||
struct dir_entry *look_up(char *name);
|
||||
void recurse_dir(char *path, struct dir_entry *dir_ptr);
|
||||
void read_device(long offset, int nr_of_bytes, char *buffer);
|
||||
int valid_fs(void);
|
||||
void usage(void);
|
||||
void print_date(char *date);
|
||||
void print_dir_date(char *date);
|
||||
void iso_info(struct iso9660_descriptor *vol_desc);
|
||||
void hs_info(struct high_sierra_descriptor *vol_desc);
|
||||
int iso_711(char *c);
|
||||
int iso_712(char *c);
|
||||
int iso_721(char *c);
|
||||
int iso_722(char *c);
|
||||
int iso_723(char *c);
|
||||
long iso_731(char *c);
|
||||
long iso_732(char *c);
|
||||
long iso_733(char *c);
|
||||
|
||||
|
||||
char Buffer[BLOCK_SIZE]; /* buffer to hold read data */
|
||||
|
|
|
@ -11,24 +11,24 @@
|
|||
|
||||
#define MAXFLD 200 /* maximum # of fields to accept */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void error, (char *s, char *t));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void match, (void));
|
||||
_PROTOTYPE(void f1_only, (void));
|
||||
_PROTOTYPE(void f2_only, (void));
|
||||
_PROTOTYPE(void output, (int flag));
|
||||
_PROTOTYPE(void outfld, (int file));
|
||||
_PROTOTYPE(void outputf, (int flag));
|
||||
_PROTOTYPE(int compare, (void));
|
||||
_PROTOTYPE(int get1, (void));
|
||||
_PROTOTYPE(int get2, (int back));
|
||||
_PROTOTYPE(int getrec, (int file));
|
||||
_PROTOTYPE(int split, (int file));
|
||||
_PROTOTYPE(int atoi, (char *str));
|
||||
_PROTOTYPE(int exit, (int val));
|
||||
_PROTOTYPE(FILE * efopen, (char *file, char *mode));
|
||||
_PROTOTYPE(void (*outfun), (int file)); /* output func: output() or outputf()*/
|
||||
int main(int argc, char **argv);
|
||||
void error(char *s, char *t);
|
||||
void usage(void);
|
||||
void match(void);
|
||||
void f1_only(void);
|
||||
void f2_only(void);
|
||||
void output(int flag);
|
||||
void outfld(int file);
|
||||
void outputf(int flag);
|
||||
int compare(void);
|
||||
int get1(void);
|
||||
int get2(int back);
|
||||
int getrec(int file);
|
||||
int split(int file);
|
||||
int atoi(char *str);
|
||||
int exit(int val);
|
||||
FILE * efopen(char *file, char *mode);
|
||||
void(*outfun) (int file);
|
||||
|
||||
#define F1 1
|
||||
#define F2 2
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void usage(void);
|
||||
|
||||
/* Table of signal names. */
|
||||
struct signames {
|
||||
|
|
|
@ -95,15 +95,15 @@ char *boot_down; /* "crash" or "down " flag */
|
|||
logout *first_link = NULL; /* List of logout times */
|
||||
int interrupt = FALSE; /* If sigint or sigquit occurs */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void Sigint, (int sig));
|
||||
_PROTOTYPE(void Sigquit, (int sig));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void Process, (struct utmp *wtmp));
|
||||
_PROTOTYPE(int Print_Record, (struct utmp *wtmp));
|
||||
_PROTOTYPE(void Print_Duration, (long from, long to));
|
||||
_PROTOTYPE(void Print_Uptime, (void));
|
||||
_PROTOTYPE(void Record_Logout_Time, (struct utmp *wtmp));
|
||||
int main(int argc, char **argv);
|
||||
void Sigint(int sig);
|
||||
void Sigquit(int sig);
|
||||
void usage(void);
|
||||
void Process(struct utmp *wtmp);
|
||||
int Print_Record(struct utmp *wtmp);
|
||||
void Print_Duration(long from, long to);
|
||||
void Print_Uptime(void);
|
||||
void Record_Logout_Time(struct utmp *wtmp);
|
||||
|
||||
/* Sigint() and Sigquit() Flag occurrence of an interrupt. */
|
||||
void Sigint(sig)
|
||||
|
|
|
@ -99,12 +99,12 @@ char term[128];
|
|||
char **env;
|
||||
extern char **environ;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void wtmp, (char *user, int uid));
|
||||
_PROTOTYPE(void show_file, (char *nam));
|
||||
_PROTOTYPE(void Time_out, (int dummy));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void add2env, (char **env, char *entry, int replace));
|
||||
int main(int argc, char **argv);
|
||||
void wtmp(char *user, int uid);
|
||||
void show_file(char *nam);
|
||||
void Time_out(int dummy);
|
||||
void usage(void);
|
||||
void add2env(char **env, char *entry, int replace);
|
||||
|
||||
void wtmp(user, uid)
|
||||
char *user; /* user name */
|
||||
|
|
|
@ -73,23 +73,23 @@ unsigned oldmask; /* saved umask() */
|
|||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(int deliver, (int count, char *vec []));
|
||||
_PROTOTYPE(FILE *makerewindable, (void));
|
||||
_PROTOTYPE(int copy, (FILE *fromfp, FILE *tofp));
|
||||
_PROTOTYPE(void readbox, (void));
|
||||
_PROTOTYPE(void printall, (void));
|
||||
_PROTOTYPE(void interact, (void));
|
||||
_PROTOTYPE(void onint, (int dummy));
|
||||
_PROTOTYPE(void savelet, (struct letter *let, char *savefile));
|
||||
_PROTOTYPE(void updatebox, (void));
|
||||
_PROTOTYPE(void printlet, (struct letter *let, FILE *tofp));
|
||||
_PROTOTYPE(void doshell, (char *command));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(char *basename, (char *name));
|
||||
_PROTOTYPE(char *whoami, (void));
|
||||
_PROTOTYPE(void dohelp, (void));
|
||||
_PROTOTYPE(int filesize, (char *name));
|
||||
int main(int argc, char **argv);
|
||||
int deliver(int count, char *vec []);
|
||||
FILE *makerewindable(void);
|
||||
int copy(FILE *fromfp, FILE *tofp);
|
||||
void readbox(void);
|
||||
void printall(void);
|
||||
void interact(void);
|
||||
void onint(int dummy);
|
||||
void savelet(struct letter *let, char *savefile);
|
||||
void updatebox(void);
|
||||
void printlet(struct letter *let, FILE *tofp);
|
||||
void doshell(char *command);
|
||||
void usage(void);
|
||||
char *basename(char *name);
|
||||
char *whoami(void);
|
||||
void dohelp(void);
|
||||
int filesize(char *name);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -55,13 +55,13 @@ PRIVATE char def_name[] = "core"; /* Default core name */
|
|||
#define SIZE_KINFO sizeof(struct proc)
|
||||
#define SIZE_HEADER SIZE_MP_SEG
|
||||
|
||||
FORWARD _PROTOTYPE( int kernel_info , (int fd ));
|
||||
FORWARD _PROTOTYPE( void setmap , (struct file *fp ));
|
||||
FORWARD _PROTOTYPE( void read_info , (struct file *fp ));
|
||||
FORWARD _PROTOTYPE( void ill_addr , (long d , int segment ));
|
||||
FORWARD _PROTOTYPE( long map_addr , (long d , int segment ));
|
||||
FORWARD _PROTOTYPE( unsigned long c_status, (void));
|
||||
FORWARD _PROTOTYPE( long getn, (long d, int s) );
|
||||
FORWARD int kernel_info(int fd );
|
||||
FORWARD void setmap(struct file *fp );
|
||||
FORWARD void read_info(struct file *fp );
|
||||
FORWARD void ill_addr(long d , int segment );
|
||||
FORWARD long map_addr(long d , int segment );
|
||||
FORWARD unsigned long c_status(void);
|
||||
FORWARD long getn(long d, int s);
|
||||
|
||||
/*
|
||||
* set and display mapping for core file
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include <minix/callnr.h>
|
||||
#include "proto.h"
|
||||
|
||||
FORWARD _PROTOTYPE( void get_message, (message *m, unsigned bx) );
|
||||
FORWARD _PROTOTYPE( void get_data, (char *s, unsigned bx, int cnt) );
|
||||
FORWARD void get_message(message *m, unsigned bx);
|
||||
FORWARD void get_data(char *s, unsigned bx, int cnt);
|
||||
|
||||
PRIVATE message sent;
|
||||
PRIVATE message recv;
|
||||
|
|
|
@ -50,14 +50,13 @@ struct symtab_s
|
|||
|
||||
PRIVATE struct symtab_s symtab;
|
||||
|
||||
FORWARD _PROTOTYPE( void gnu_sort , (struct newnlist *array ,
|
||||
struct newnlist *top ));
|
||||
FORWARD _PROTOTYPE( int gnu_symeq , (char *t , struct newnlist *sp ));
|
||||
FORWARD _PROTOTYPE( int gnu_symprefix , (char *t , struct newnlist *sp ));
|
||||
FORWARD _PROTOTYPE( struct newnlist *gnu_sname, (char *name, int is_text,
|
||||
int allflag) );
|
||||
FORWARD _PROTOTYPE( struct newnlist *gnu_sval, (off_t value, int where) );
|
||||
FORWARD _PROTOTYPE( void gnu_sym, (struct newnlist *sp, off_t off) );
|
||||
FORWARD void gnu_sort(struct newnlist *array , struct newnlist *top );
|
||||
FORWARD int gnu_symeq(char *t , struct newnlist *sp );
|
||||
FORWARD int gnu_symprefix(char *t , struct newnlist *sp );
|
||||
FORWARD struct newnlist *gnu_sname(char *name, int is_text, int
|
||||
allflag);
|
||||
FORWARD struct newnlist *gnu_sval(off_t value, int where);
|
||||
FORWARD void gnu_sym(struct newnlist *sp, off_t off);
|
||||
|
||||
|
||||
PUBLIC void gnu_init( filename )
|
||||
|
|
|
@ -25,7 +25,7 @@ PRIVATE FILE *outfile = stdout;
|
|||
PRIVATE FILE *logfile;
|
||||
PRIVATE int lineno;
|
||||
|
||||
_PROTOTYPE( int _doprnt, (const char *format, va_list ap, FILE *stream ));
|
||||
int _doprnt(const char *format, va_list ap, FILE *stream );
|
||||
|
||||
PUBLIC char *get_cmd(cbuf, csize)
|
||||
char *cbuf;
|
||||
|
|
|
@ -73,22 +73,22 @@ struct b_pnt {
|
|||
char cmd[1];
|
||||
} *b_head, *curpnt;
|
||||
|
||||
_PROTOTYPE( int main , (int argc, char *argv[]));
|
||||
int main(int argc, char *argv[]);
|
||||
|
||||
FORWARD _PROTOTYPE( void cleanup , (void));
|
||||
FORWARD _PROTOTYPE( void freepnt , (struct b_pnt *pnt ));
|
||||
FORWARD _PROTOTYPE( void findbpnt , (int verbose ));
|
||||
FORWARD _PROTOTYPE( int exebpnt , (int restart ));
|
||||
FORWARD _PROTOTYPE( void catch , (int sig ));
|
||||
FORWARD _PROTOTYPE( int run , (char *name , char *argstr , int tflg ));
|
||||
FORWARD _PROTOTYPE( int dowait , (void));
|
||||
FORWARD _PROTOTYPE( void backtrace , (int all ));
|
||||
FORWARD _PROTOTYPE( void modify , (long addr , int cnt , int verbose , int size ));
|
||||
FORWARD _PROTOTYPE( void display , (long addr , int req ));
|
||||
FORWARD _PROTOTYPE( void fill , (long addr , int req ));
|
||||
FORWARD _PROTOTYPE( void dorun , (char *cmd ));
|
||||
FORWARD _PROTOTYPE( void not_for_core , (void));
|
||||
FORWARD _PROTOTYPE( void command , (void));
|
||||
FORWARD void cleanup(void);
|
||||
FORWARD void freepnt(struct b_pnt *pnt );
|
||||
FORWARD void findbpnt(int verbose );
|
||||
FORWARD int exebpnt(int restart );
|
||||
FORWARD void catch(int sig );
|
||||
FORWARD int run(char *name , char *argstr , int tflg );
|
||||
FORWARD int dowait(void);
|
||||
FORWARD void backtrace(int all );
|
||||
FORWARD void modify(long addr , int cnt , int verbose , int size );
|
||||
FORWARD void display(long addr , int req );
|
||||
FORWARD void fill(long addr , int req );
|
||||
FORWARD void dorun(char *cmd );
|
||||
FORWARD void not_for_core(void);
|
||||
FORWARD void command(void);
|
||||
|
||||
|
||||
PRIVATE void cleanup()
|
||||
|
|
|
@ -18,15 +18,15 @@ struct address_s
|
|||
PRIVATE int bits32;
|
||||
PRIVATE struct address_s uptr;
|
||||
|
||||
FORWARD _PROTOTYPE( u8_t get8, (void) );
|
||||
FORWARD _PROTOTYPE( u16_t get16, (void) );
|
||||
FORWARD _PROTOTYPE( u32_t get32, (void) );
|
||||
FORWARD _PROTOTYPE( u8_t peek_byte, (off_t addr) );
|
||||
FORWARD _PROTOTYPE( u16_t peek_word, (off_t addr) );
|
||||
FORWARD _PROTOTYPE( int puti, (void) );
|
||||
FORWARD _PROTOTYPE( int outsegaddr, (struct address_s *addr) );
|
||||
FORWARD _PROTOTYPE( int outssegaddr, (struct address_s *addr) );
|
||||
FORWARD _PROTOTYPE( int show1instruction , (void));
|
||||
FORWARD u8_t get8(void);
|
||||
FORWARD u16_t get16(void);
|
||||
FORWARD u32_t get32(void);
|
||||
FORWARD u8_t peek_byte(off_t addr);
|
||||
FORWARD u16_t peek_word(off_t addr);
|
||||
FORWARD int puti(void);
|
||||
FORWARD int outsegaddr(struct address_s *addr);
|
||||
FORWARD int outssegaddr(struct address_s *addr);
|
||||
FORWARD int show1instruction(void);
|
||||
|
||||
/************************* UNASM ******************************/
|
||||
|
||||
|
@ -62,71 +62,71 @@ typedef int reg_pt;
|
|||
typedef int su16_t;
|
||||
typedef int su8_pt;
|
||||
|
||||
FORWARD _PROTOTYPE( su8_pt get8s , (void));
|
||||
FORWARD _PROTOTYPE( void getmodregrm , (void));
|
||||
FORWARD _PROTOTYPE( void i_00_to_3f , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_40_to_5f , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_60_to_6f , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_70_to_7f , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_80 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_88 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_90 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_98 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_a0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_a8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_b0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_b8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_c0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_c8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_d0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_d8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_e0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_e8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_f0 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void i_f8 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void outad , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void outad1 , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void outalorx , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void outax , (void));
|
||||
FORWARD _PROTOTYPE( void outbptr , (void));
|
||||
FORWARD _PROTOTYPE( void outbwptr , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void outea , (opcode_pt wordflags ));
|
||||
FORWARD _PROTOTYPE( void outf1 , (void));
|
||||
FORWARD _PROTOTYPE( void out32offset , (void));
|
||||
FORWARD _PROTOTYPE( void outfishy , (void));
|
||||
FORWARD _PROTOTYPE( void outgetaddr , (void));
|
||||
FORWARD _PROTOTYPE( void outimmed , (opcode_pt signwordflag ));
|
||||
FORWARD _PROTOTYPE( void outpc , (off_t pc ));
|
||||
FORWARD _PROTOTYPE( void outsegpc , (void));
|
||||
FORWARD _PROTOTYPE( void oututstr , (char *s ));
|
||||
FORWARD _PROTOTYPE( void outword , (void));
|
||||
FORWARD _PROTOTYPE( void outwptr , (void));
|
||||
FORWARD _PROTOTYPE( void outwsize , (void));
|
||||
FORWARD _PROTOTYPE( void pagef , (void));
|
||||
FORWARD _PROTOTYPE( void shift , (opcode_pt opc ));
|
||||
FORWARD _PROTOTYPE( void checkmemory , (void));
|
||||
FORWARD _PROTOTYPE( void CL , (void));
|
||||
FORWARD _PROTOTYPE( void Eb , (void));
|
||||
FORWARD _PROTOTYPE( void Ev , (void));
|
||||
FORWARD _PROTOTYPE( void EvGv , (void));
|
||||
FORWARD _PROTOTYPE( void EvIb , (void));
|
||||
FORWARD _PROTOTYPE( void Ew , (void));
|
||||
FORWARD _PROTOTYPE( void EwRw , (void));
|
||||
FORWARD _PROTOTYPE( void Gv , (void));
|
||||
FORWARD _PROTOTYPE( void Gv1 , (void));
|
||||
FORWARD _PROTOTYPE( void GvEv , (void));
|
||||
FORWARD _PROTOTYPE( void GvEw , (void));
|
||||
FORWARD _PROTOTYPE( void GvM , (void));
|
||||
FORWARD _PROTOTYPE( void GvMa , (void));
|
||||
FORWARD _PROTOTYPE( void GvMp , (void));
|
||||
FORWARD _PROTOTYPE( void Ib , (void));
|
||||
FORWARD _PROTOTYPE( void Iw , (void));
|
||||
FORWARD _PROTOTYPE( void Iv , (void));
|
||||
FORWARD _PROTOTYPE( void Jb , (void));
|
||||
FORWARD _PROTOTYPE( void Jv , (void));
|
||||
FORWARD _PROTOTYPE( void Ms , (void));
|
||||
FORWARD su8_pt get8s(void);
|
||||
FORWARD void getmodregrm(void);
|
||||
FORWARD void i_00_to_3f(opcode_pt opc );
|
||||
FORWARD void i_40_to_5f(opcode_pt opc );
|
||||
FORWARD void i_60_to_6f(opcode_pt opc );
|
||||
FORWARD void i_70_to_7f(opcode_pt opc );
|
||||
FORWARD void i_80(opcode_pt opc );
|
||||
FORWARD void i_88(opcode_pt opc );
|
||||
FORWARD void i_90(opcode_pt opc );
|
||||
FORWARD void i_98(opcode_pt opc );
|
||||
FORWARD void i_a0(opcode_pt opc );
|
||||
FORWARD void i_a8(opcode_pt opc );
|
||||
FORWARD void i_b0(opcode_pt opc );
|
||||
FORWARD void i_b8(opcode_pt opc );
|
||||
FORWARD void i_c0(opcode_pt opc );
|
||||
FORWARD void i_c8(opcode_pt opc );
|
||||
FORWARD void i_d0(opcode_pt opc );
|
||||
FORWARD void i_d8(opcode_pt opc );
|
||||
FORWARD void i_e0(opcode_pt opc );
|
||||
FORWARD void i_e8(opcode_pt opc );
|
||||
FORWARD void i_f0(opcode_pt opc );
|
||||
FORWARD void i_f8(opcode_pt opc );
|
||||
FORWARD void outad(opcode_pt opc );
|
||||
FORWARD void outad1(opcode_pt opc );
|
||||
FORWARD void outalorx(opcode_pt opc );
|
||||
FORWARD void outax(void);
|
||||
FORWARD void outbptr(void);
|
||||
FORWARD void outbwptr(opcode_pt opc );
|
||||
FORWARD void outea(opcode_pt wordflags );
|
||||
FORWARD void outf1(void);
|
||||
FORWARD void out32offset(void);
|
||||
FORWARD void outfishy(void);
|
||||
FORWARD void outgetaddr(void);
|
||||
FORWARD void outimmed(opcode_pt signwordflag );
|
||||
FORWARD void outpc(off_t pc );
|
||||
FORWARD void outsegpc(void);
|
||||
FORWARD void oututstr(char *s );
|
||||
FORWARD void outword(void);
|
||||
FORWARD void outwptr(void);
|
||||
FORWARD void outwsize(void);
|
||||
FORWARD void pagef(void);
|
||||
FORWARD void shift(opcode_pt opc );
|
||||
FORWARD void checkmemory(void);
|
||||
FORWARD void CL(void);
|
||||
FORWARD void Eb(void);
|
||||
FORWARD void Ev(void);
|
||||
FORWARD void EvGv(void);
|
||||
FORWARD void EvIb(void);
|
||||
FORWARD void Ew(void);
|
||||
FORWARD void EwRw(void);
|
||||
FORWARD void Gv(void);
|
||||
FORWARD void Gv1(void);
|
||||
FORWARD void GvEv(void);
|
||||
FORWARD void GvEw(void);
|
||||
FORWARD void GvM(void);
|
||||
FORWARD void GvMa(void);
|
||||
FORWARD void GvMp(void);
|
||||
FORWARD void Ib(void);
|
||||
FORWARD void Iw(void);
|
||||
FORWARD void Iv(void);
|
||||
FORWARD void Jb(void);
|
||||
FORWARD void Jv(void);
|
||||
FORWARD void Ms(void);
|
||||
|
||||
_PROTOTYPE( typedef void (*pfv_t),(opcode_pt opc ));
|
||||
typedef void(*pfv_t) (opcode_pt opc );
|
||||
|
||||
PRIVATE pfv_t optable[] =
|
||||
{
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include <string.h>
|
||||
#include "proto.h"
|
||||
|
||||
FORWARD _PROTOTYPE(long value , (char *s , char **s_p , int *seg_p ));
|
||||
FORWARD _PROTOTYPE(long lookup , (char *s , char **s_p , int *seg_p ));
|
||||
FORWARD long value(char *s , char **s_p , int *seg_p );
|
||||
FORWARD long lookup(char *s , char **s_p , int *seg_p );
|
||||
|
||||
#define idchar(c) (isalpha(c) || isdigit(c) || (c) == '_')
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <sys/ptrace.h>
|
||||
#include "proto.h"
|
||||
|
||||
FORWARD _PROTOTYPE( void pr_ascii , (long val , int size ));
|
||||
FORWARD void pr_ascii(long val , int size );
|
||||
|
||||
/* Print ascii */
|
||||
PRIVATE void pr_ascii(val, size)
|
||||
|
|
|
@ -4,102 +4,102 @@
|
|||
|
||||
/* core.c */
|
||||
|
||||
_PROTOTYPE( void prtmap, (void) );
|
||||
_PROTOTYPE( unsigned long core_init, (char *filename) );
|
||||
_PROTOTYPE( unsigned long file_init, (char *filename) );
|
||||
_PROTOTYPE( long read_core, (int req, long addr, long data) );
|
||||
void prtmap(void);
|
||||
unsigned long core_init(char *filename);
|
||||
unsigned long file_init(char *filename);
|
||||
long read_core(int req, long addr, long data);
|
||||
|
||||
/* mdb.c */
|
||||
|
||||
_PROTOTYPE( void mdb_error, (char *s) );
|
||||
_PROTOTYPE( long breakpt , (long addr , char *cmd ));
|
||||
_PROTOTYPE( void tstart , (int req , int verbose , int val , int cnt ));
|
||||
void mdb_error(char *s);
|
||||
long breakpt(long addr , char *cmd );
|
||||
void tstart(int req , int verbose , int val , int cnt );
|
||||
|
||||
/* io.c */
|
||||
|
||||
_PROTOTYPE( char *get_cmd , (char *cbuf, int csize) );
|
||||
_PROTOTYPE( void openin , (char *s ));
|
||||
_PROTOTYPE( void logging, (int c, char *name) );
|
||||
_PROTOTYPE( void do_error, (char *message) );
|
||||
_PROTOTYPE( int Printf, (const char *format, ...));
|
||||
_PROTOTYPE( void outbyte, (int byte) );
|
||||
_PROTOTYPE( void outcomma, (void) );
|
||||
_PROTOTYPE( void outh8, (unsigned num) );
|
||||
_PROTOTYPE( void outh16, (unsigned num) );
|
||||
_PROTOTYPE( void outh32, (unsigned num) );
|
||||
_PROTOTYPE( void outh4, (unsigned num) );
|
||||
_PROTOTYPE( void outspace, (void) );
|
||||
_PROTOTYPE( void outstr, (char *s) );
|
||||
_PROTOTYPE( void outtab, (void) );
|
||||
_PROTOTYPE( void outustr, (char *s) );
|
||||
_PROTOTYPE( void closestring, (void) );
|
||||
_PROTOTYPE( int mytolower, (int ch) );
|
||||
_PROTOTYPE( void openstring, (char *string) );
|
||||
_PROTOTYPE( int stringpos, (void) );
|
||||
_PROTOTYPE( int stringtab, (void) );
|
||||
char *get_cmd(char *cbuf, int csize);
|
||||
void openin(char *s );
|
||||
void logging(int c, char *name);
|
||||
void do_error(char *message);
|
||||
int Printf(const char *format, ...);
|
||||
void outbyte(int byte);
|
||||
void outcomma(void);
|
||||
void outh8(unsigned num);
|
||||
void outh16(unsigned num);
|
||||
void outh32(unsigned num);
|
||||
void outh4(unsigned num);
|
||||
void outspace(void);
|
||||
void outstr(char *s);
|
||||
void outtab(void);
|
||||
void outustr(char *s);
|
||||
void closestring(void);
|
||||
int mytolower(int ch);
|
||||
void openstring(char *string);
|
||||
int stringpos(void);
|
||||
int stringtab(void);
|
||||
|
||||
/* mdbdis86.c */
|
||||
|
||||
_PROTOTYPE( long dasm, (long addr, int count, int symflg) );
|
||||
long dasm(long addr, int count, int symflg);
|
||||
|
||||
/* mdbexp.c */
|
||||
|
||||
_PROTOTYPE( char *getexp, (char *buf, long *exp_p, int *seg_p) );
|
||||
_PROTOTYPE( char *skip, (char *s) );
|
||||
char *getexp(char *buf, long *exp_p, int *seg_p);
|
||||
char *skip(char *s);
|
||||
|
||||
/* kernel.c */
|
||||
_PROTOTYPE( long get_reg, (int pid, long k) );
|
||||
_PROTOTYPE( void set_reg, (int pid, long k, long value) );
|
||||
_PROTOTYPE( long reg_addr, (char *s) );
|
||||
_PROTOTYPE( int disp_regs, (void) );
|
||||
_PROTOTYPE( int outsegreg, (off_t num) );
|
||||
_PROTOTYPE( void update , (void));
|
||||
_PROTOTYPE( void disp_maps , (void));
|
||||
long get_reg(int pid, long k);
|
||||
void set_reg(int pid, long k, long value);
|
||||
long reg_addr(char *s);
|
||||
int disp_regs(void);
|
||||
int outsegreg(off_t num);
|
||||
void update(void);
|
||||
void disp_maps(void);
|
||||
|
||||
/* misc.c */
|
||||
|
||||
_PROTOTYPE( void dump_stack, (long count) );
|
||||
_PROTOTYPE( off_t file_size, (int fd) );
|
||||
_PROTOTYPE( void help_on, (int h) );
|
||||
_PROTOTYPE( void version_info, (void) );
|
||||
_PROTOTYPE( void help_page, (void) );
|
||||
void dump_stack(long count);
|
||||
off_t file_size(int fd);
|
||||
void help_on(int h);
|
||||
void version_info(void);
|
||||
void help_page(void);
|
||||
|
||||
#if EXTRA_SYMBOLS
|
||||
/* gnu_sym.c */
|
||||
_PROTOTYPE( void gnu_init, (char *filename) );
|
||||
_PROTOTYPE( long gnu_symbolvalue, (char *name, int is_text ) );
|
||||
_PROTOTYPE( void gnu_symbolic, (off_t value, int separator) );
|
||||
_PROTOTYPE( void gnu_listsym, (int tchar) );
|
||||
_PROTOTYPE( int gnu_text_symbol, (off_t value) );
|
||||
_PROTOTYPE( int gnu_finds_pc, (off_t pc) );
|
||||
_PROTOTYPE( int gnu_finds_data, (off_t off, int data_seg) );
|
||||
void gnu_init(char *filename);
|
||||
long gnu_symbolvalue(char *name, int is_text );
|
||||
void gnu_symbolic(off_t value, int separator);
|
||||
void gnu_listsym(int tchar);
|
||||
int gnu_text_symbol(off_t value);
|
||||
int gnu_finds_pc(off_t pc);
|
||||
int gnu_finds_data(off_t off, int data_seg);
|
||||
#endif /* EXTRA_SYMBOLS */
|
||||
|
||||
/* sym.c */
|
||||
_PROTOTYPE( void syminit, (char *filename) );
|
||||
_PROTOTYPE( long symbolvalue, (char *name, int is_text ) );
|
||||
_PROTOTYPE( void printhex, (off_t v) );
|
||||
_PROTOTYPE( void symbolic, (off_t value, int separator) );
|
||||
_PROTOTYPE( void listsym, (char *cmd) );
|
||||
_PROTOTYPE( int text_symbol, (off_t value) );
|
||||
_PROTOTYPE( int finds_pc, (off_t pc) );
|
||||
_PROTOTYPE( int finds_data, (off_t off, int data_seg) );
|
||||
void syminit(char *filename);
|
||||
long symbolvalue(char *name, int is_text );
|
||||
void printhex(off_t v);
|
||||
void symbolic(off_t value, int separator);
|
||||
void listsym(char *cmd);
|
||||
int text_symbol(off_t value);
|
||||
int finds_pc(off_t pc);
|
||||
int finds_data(off_t off, int data_seg);
|
||||
|
||||
/* trace.c */
|
||||
_PROTOTYPE( long mdbtrace, (int req, int pid, long addr, long data) );
|
||||
_PROTOTYPE( u32_t peek_dword, (off_t addr));
|
||||
long mdbtrace(int req, int pid, long addr, long data);
|
||||
u32_t peek_dword(off_t addr);
|
||||
|
||||
#if SYSCALLS_SUPPORT
|
||||
|
||||
/* syscalls.c */
|
||||
_PROTOTYPE( void start_syscall, (long addr) );
|
||||
_PROTOTYPE( void do_syscall, (long addr) );
|
||||
void start_syscall(long addr);
|
||||
void do_syscall(long addr);
|
||||
|
||||
/* decode.c */
|
||||
_PROTOTYPE( void decode_message, (unsigned addr) );
|
||||
_PROTOTYPE( void decode_result, (void) );
|
||||
void decode_message(unsigned addr);
|
||||
void decode_result(void);
|
||||
|
||||
/* ioctl.c */
|
||||
_PROTOTYPE( void decode_ioctl, (int sr, message *m) );
|
||||
void decode_ioctl(int sr, message *m);
|
||||
|
||||
#endif /* SYSCALLS_SUPPORT */
|
||||
|
|
|
@ -23,13 +23,13 @@ struct symtab_s
|
|||
PRIVATE struct symtab_s symtab;
|
||||
PRIVATE int type_of_exec;
|
||||
|
||||
FORWARD _PROTOTYPE( int check_exec, (struct exec *hdr) );
|
||||
FORWARD _PROTOTYPE( void sortsyms , (struct nlist *array , struct nlist *top ));
|
||||
FORWARD _PROTOTYPE( int symeq , (char *t , struct nlist *sp ));
|
||||
FORWARD _PROTOTYPE( int symprefix , (char *t , struct nlist *sp ));
|
||||
FORWARD _PROTOTYPE( struct nlist *findsname, (char *name, int is_text, int allflag) );
|
||||
FORWARD _PROTOTYPE( void outsym, (struct nlist *sp, off_t off) );
|
||||
FORWARD _PROTOTYPE( struct nlist *findsval, (off_t value, int where) );
|
||||
FORWARD int check_exec(struct exec *hdr);
|
||||
FORWARD void sortsyms(struct nlist *array , struct nlist *top );
|
||||
FORWARD int symeq(char *t , struct nlist *sp );
|
||||
FORWARD int symprefix(char *t , struct nlist *sp );
|
||||
FORWARD struct nlist *findsname(char *name, int is_text, int allflag);
|
||||
FORWARD void outsym(struct nlist *sp, off_t off);
|
||||
FORWARD struct nlist *findsval(off_t value, int where);
|
||||
|
||||
PUBLIC void syminit( filename )
|
||||
char *filename;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
_PROTOTYPE( int main, (int argc, char *argv []) );
|
||||
int main(int argc, char *argv []);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -239,131 +239,135 @@ extern long chars_saved; /* Nr of chars saved in buffer */
|
|||
|
||||
/* mined1.c */
|
||||
|
||||
_PROTOTYPE(void FS, (void));
|
||||
_PROTOTYPE(void VI, (void));
|
||||
_PROTOTYPE(int WT, (void));
|
||||
_PROTOTYPE(void XWT, (void));
|
||||
_PROTOTYPE(void SH, (void));
|
||||
_PROTOTYPE(LINE *proceed, (LINE *line, int count ));
|
||||
_PROTOTYPE(int bottom_line, (FLAG revfl, char *s1, char *s2, char *inbuf, FLAG statfl ));
|
||||
_PROTOTYPE(int count_chars, (LINE *line ));
|
||||
_PROTOTYPE(void move, (int new_x, char *new_address, int new_y ));
|
||||
_PROTOTYPE(int find_x, (LINE *line, char *address ));
|
||||
_PROTOTYPE(char *find_address, (LINE *line, int x_coord, int *old_x ));
|
||||
_PROTOTYPE(int length_of, (char *string ));
|
||||
_PROTOTYPE(void copy_string, (char *to, char *from ));
|
||||
_PROTOTYPE(void reset, (LINE *head_line, int screen_y ));
|
||||
_PROTOTYPE(void set_cursor, (int nx, int ny ));
|
||||
_PROTOTYPE(void open_device, (void));
|
||||
_PROTOTYPE(int getchar, (void));
|
||||
_PROTOTYPE(void display, (int x_coord, int y_coord, LINE *line, int count ));
|
||||
_PROTOTYPE(int write_char, (int fd, int c ));
|
||||
_PROTOTYPE(int writeline, (int fd, char *text ));
|
||||
_PROTOTYPE(void put_line, (LINE *line, int offset, FLAG clear_line ));
|
||||
_PROTOTYPE(int flush_buffer, (int fd ));
|
||||
_PROTOTYPE(void bad_write, (int fd ));
|
||||
_PROTOTYPE(void catch, (int sig ));
|
||||
_PROTOTYPE(void abort_mined, (void));
|
||||
_PROTOTYPE(void raw_mode, (FLAG state ));
|
||||
_PROTOTYPE(void panic, (char *message ));
|
||||
_PROTOTYPE(char *alloc, (int bytes ));
|
||||
_PROTOTYPE(void free_space, (char *p ));
|
||||
void FS(void);
|
||||
void VI(void);
|
||||
int WT(void);
|
||||
void XWT(void);
|
||||
void SH(void);
|
||||
LINE *proceed(LINE *line, int count );
|
||||
int bottom_line(FLAG revfl, char *s1, char *s2, char *inbuf, FLAG statfl
|
||||
);
|
||||
int count_chars(LINE *line );
|
||||
void move(int new_x, char *new_address, int new_y );
|
||||
int find_x(LINE *line, char *address );
|
||||
char *find_address(LINE *line, int x_coord, int *old_x );
|
||||
int length_of(char *string );
|
||||
void copy_string(char *to, char *from );
|
||||
void reset(LINE *head_line, int screen_y );
|
||||
void set_cursor(int nx, int ny );
|
||||
void open_device(void);
|
||||
int getchar(void);
|
||||
void display(int x_coord, int y_coord, LINE *line, int count );
|
||||
int write_char(int fd, int c );
|
||||
int writeline(int fd, char *text );
|
||||
void put_line(LINE *line, int offset, FLAG clear_line );
|
||||
int flush_buffer(int fd );
|
||||
void bad_write(int fd );
|
||||
void catch(int sig );
|
||||
void abort_mined(void);
|
||||
void raw_mode(FLAG state );
|
||||
void panic(char *message );
|
||||
char *alloc(int bytes );
|
||||
void free_space(char *p );
|
||||
/*
|
||||
#ifdef UNIX
|
||||
_PROTOTYPE(void (*key_map [128]), (void));
|
||||
void(*key_map [128]) (void);
|
||||
#else
|
||||
_PROTOTYPE(void (*key_map [256]), (void));
|
||||
void(*key_map [256]) (void);
|
||||
#endif
|
||||
*/
|
||||
_PROTOTYPE(void initialize, (void));
|
||||
_PROTOTYPE(char *basename, (char *path ));
|
||||
_PROTOTYPE(void load_file, (char *file ));
|
||||
_PROTOTYPE(int get_line, (int fd, char *buffer ));
|
||||
_PROTOTYPE(LINE *install_line, (char *buffer, int length ));
|
||||
_PROTOTYPE(int main, (int argc, char *argv []));
|
||||
_PROTOTYPE(void RD, (void));
|
||||
_PROTOTYPE(void I, (void));
|
||||
_PROTOTYPE(void XT, (void));
|
||||
_PROTOTYPE(void ESC, (void));
|
||||
_PROTOTYPE(int ask_save, (void));
|
||||
_PROTOTYPE(int line_number, (void));
|
||||
_PROTOTYPE(void file_status, (char *message, long count, char *file, int lines,
|
||||
FLAG writefl, FLAG changed ));
|
||||
void initialize(void);
|
||||
char *basename(char *path );
|
||||
void load_file(char *file );
|
||||
int get_line(int fd, char *buffer );
|
||||
LINE *install_line(char *buffer, int length );
|
||||
int main(int argc, char *argv []);
|
||||
void RD(void);
|
||||
void I(void);
|
||||
void XT(void);
|
||||
void ESC(void);
|
||||
int ask_save(void);
|
||||
int line_number(void);
|
||||
void file_status(char *message, long count, char *file, int lines, FLAG
|
||||
writefl, FLAG changed );
|
||||
#if __STDC__
|
||||
void build_string(char *buf, char *fmt, ...);
|
||||
#else
|
||||
void build_string();
|
||||
#endif
|
||||
_PROTOTYPE(char *num_out, (long number ));
|
||||
_PROTOTYPE(int get_number, (char *message, int *result ));
|
||||
_PROTOTYPE(int input, (char *inbuf, FLAG clearfl ));
|
||||
_PROTOTYPE(int get_file, (char *message, char *file ));
|
||||
_PROTOTYPE(int _getchar, (void));
|
||||
_PROTOTYPE(void _flush, (void));
|
||||
_PROTOTYPE(void _putchar, (int c ));
|
||||
_PROTOTYPE(void get_term, (void));
|
||||
char *num_out(long number );
|
||||
int get_number(char *message, int *result );
|
||||
int input(char *inbuf, FLAG clearfl );
|
||||
int get_file(char *message, char *file );
|
||||
int _getchar(void);
|
||||
void _flush(void);
|
||||
void _putchar(int c );
|
||||
void get_term(void);
|
||||
|
||||
/* mined2.c */
|
||||
|
||||
_PROTOTYPE(void UP, (void));
|
||||
_PROTOTYPE(void DN, (void));
|
||||
_PROTOTYPE(void LF, (void));
|
||||
_PROTOTYPE(void RT, (void));
|
||||
_PROTOTYPE(void HIGH, (void));
|
||||
_PROTOTYPE(void LOW, (void));
|
||||
_PROTOTYPE(void BL, (void));
|
||||
_PROTOTYPE(void EL, (void));
|
||||
_PROTOTYPE(void GOTO, (void));
|
||||
_PROTOTYPE(void PD, (void));
|
||||
_PROTOTYPE(void PU, (void));
|
||||
_PROTOTYPE(void HO, (void));
|
||||
_PROTOTYPE(void EF, (void));
|
||||
_PROTOTYPE(void SU, (void));
|
||||
_PROTOTYPE(void SD, (void));
|
||||
_PROTOTYPE(int forward_scroll, (void));
|
||||
_PROTOTYPE(int reverse_scroll, (void));
|
||||
_PROTOTYPE(void MP, (void));
|
||||
_PROTOTYPE(void move_previous_word, (FLAG remove ));
|
||||
_PROTOTYPE(void MN, (void));
|
||||
_PROTOTYPE(void move_next_word, (FLAG remove ));
|
||||
_PROTOTYPE(void DCC, (void));
|
||||
_PROTOTYPE(void DPC, (void));
|
||||
_PROTOTYPE(void DLN, (void));
|
||||
_PROTOTYPE(void DNW, (void));
|
||||
_PROTOTYPE(void DPW, (void));
|
||||
_PROTOTYPE(void S, (int character ));
|
||||
_PROTOTYPE(void CTL, (void));
|
||||
_PROTOTYPE(void LIB, (void));
|
||||
_PROTOTYPE(LINE *line_insert, (LINE *line, char *string, int len ));
|
||||
_PROTOTYPE(int insert, (LINE *line, char *location, char *string ));
|
||||
_PROTOTYPE(LINE *line_delete, (LINE *line ));
|
||||
_PROTOTYPE(void delete, (LINE *start_line, char *start_textp, LINE *end_line, char *end_textp ));
|
||||
_PROTOTYPE(void PT, (void));
|
||||
_PROTOTYPE(void IF, (void));
|
||||
_PROTOTYPE(void file_insert, (int fd, FLAG old_pos ));
|
||||
_PROTOTYPE(void WB, (void));
|
||||
_PROTOTYPE(void MA, (void));
|
||||
_PROTOTYPE(void YA, (void));
|
||||
_PROTOTYPE(void DT, (void));
|
||||
_PROTOTYPE(void set_up, (FLAG remove ));
|
||||
_PROTOTYPE(FLAG checkmark, (void));
|
||||
_PROTOTYPE(int legal, (void));
|
||||
_PROTOTYPE(void yank, (LINE *start_line, char *start_textp, LINE *end_line, char *end_textp, FLAG remove ));
|
||||
_PROTOTYPE(int scratch_file, (FLAG mode ));
|
||||
_PROTOTYPE(void SF, (void));
|
||||
_PROTOTYPE(void SR, (void));
|
||||
_PROTOTYPE(REGEX *get_expression, (char *message ));
|
||||
_PROTOTYPE(void GR, (void));
|
||||
_PROTOTYPE(void LR, (void));
|
||||
_PROTOTYPE(void change, (char *message, FLAG file ));
|
||||
_PROTOTYPE(char *substitute, (LINE *line, REGEX *program, char *replacement ));
|
||||
_PROTOTYPE(void search, (char *message, FLAG method ));
|
||||
_PROTOTYPE(int find_y, (LINE *match_line ));
|
||||
_PROTOTYPE(void finished, (REGEX *program, int *last_exp ));
|
||||
_PROTOTYPE(void compile, (char *pattern, REGEX *program ));
|
||||
_PROTOTYPE(LINE *match, (REGEX *program, char *string, FLAG method ));
|
||||
_PROTOTYPE(int line_check, (REGEX *program, char *string, FLAG method ));
|
||||
_PROTOTYPE(int check_string, (REGEX *program, char *string, int *expression ));
|
||||
_PROTOTYPE(int star, (REGEX *program, char *end_position, char *string, int *expression ));
|
||||
_PROTOTYPE(int in_list, (int *list, int c, int list_length, int opcode ));
|
||||
_PROTOTYPE(void dummy_line, (void));
|
||||
void UP(void);
|
||||
void DN(void);
|
||||
void LF(void);
|
||||
void RT(void);
|
||||
void HIGH(void);
|
||||
void LOW(void);
|
||||
void BL(void);
|
||||
void EL(void);
|
||||
void GOTO(void);
|
||||
void PD(void);
|
||||
void PU(void);
|
||||
void HO(void);
|
||||
void EF(void);
|
||||
void SU(void);
|
||||
void SD(void);
|
||||
int forward_scroll(void);
|
||||
int reverse_scroll(void);
|
||||
void MP(void);
|
||||
void move_previous_word(FLAG remove );
|
||||
void MN(void);
|
||||
void move_next_word(FLAG remove );
|
||||
void DCC(void);
|
||||
void DPC(void);
|
||||
void DLN(void);
|
||||
void DNW(void);
|
||||
void DPW(void);
|
||||
void S(int character );
|
||||
void CTL(void);
|
||||
void LIB(void);
|
||||
LINE *line_insert(LINE *line, char *string, int len );
|
||||
int insert(LINE *line, char *location, char *string );
|
||||
LINE *line_delete(LINE *line );
|
||||
void delete(LINE *start_line, char *start_textp, LINE *end_line, char
|
||||
*end_textp );
|
||||
void PT(void);
|
||||
void IF(void);
|
||||
void file_insert(int fd, FLAG old_pos );
|
||||
void WB(void);
|
||||
void MA(void);
|
||||
void YA(void);
|
||||
void DT(void);
|
||||
void set_up(FLAG remove );
|
||||
FLAG checkmark(void);
|
||||
int legal(void);
|
||||
void yank(LINE *start_line, char *start_textp, LINE *end_line, char
|
||||
*end_textp, FLAG remove );
|
||||
int scratch_file(FLAG mode );
|
||||
void SF(void);
|
||||
void SR(void);
|
||||
REGEX *get_expression(char *message );
|
||||
void GR(void);
|
||||
void LR(void);
|
||||
void change(char *message, FLAG file );
|
||||
char *substitute(LINE *line, REGEX *program, char *replacement );
|
||||
void search(char *message, FLAG method );
|
||||
int find_y(LINE *match_line );
|
||||
void finished(REGEX *program, int *last_exp );
|
||||
void compile(char *pattern, REGEX *program );
|
||||
LINE *match(REGEX *program, char *string, FLAG method );
|
||||
int line_check(REGEX *program, char *string, FLAG method );
|
||||
int check_string(REGEX *program, char *string, int *expression );
|
||||
int star(REGEX *program, char *end_position, char *string, int
|
||||
*expression );
|
||||
int in_list(int *list, int c, int list_length, int opcode );
|
||||
void dummy_line(void);
|
||||
|
|
|
@ -92,40 +92,40 @@ FILE *proto;
|
|||
#define getline _mkfs_getline
|
||||
#endif
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(block_t sizeup, (char *device));
|
||||
_PROTOTYPE(void super, (zone_t zones, Ino_t inodes));
|
||||
_PROTOTYPE(void rootdir, (Ino_t inode));
|
||||
_PROTOTYPE(void eat_dir, (Ino_t parent));
|
||||
_PROTOTYPE(void eat_file, (Ino_t inode, int f));
|
||||
_PROTOTYPE(void enter_dir, (Ino_t parent, char *name, Ino_t child));
|
||||
_PROTOTYPE(void incr_size, (Ino_t n, long count));
|
||||
_PROTOTYPE(PRIVATE ino_t alloc_inode, (int mode, int usrid, int grpid));
|
||||
_PROTOTYPE(PRIVATE zone_t alloc_zone, (void));
|
||||
_PROTOTYPE(void add_zone, (Ino_t n, zone_t z, long bytes, long cur_time));
|
||||
_PROTOTYPE(void add_z_1, (Ino_t n, zone_t z, long bytes, long cur_time));
|
||||
_PROTOTYPE(void add_z_2, (Ino_t n, zone_t z, long bytes, long cur_time));
|
||||
_PROTOTYPE(void incr_link, (Ino_t n));
|
||||
_PROTOTYPE(void insert_bit, (block_t block, int bit));
|
||||
_PROTOTYPE(int mode_con, (char *p));
|
||||
_PROTOTYPE(void getline, (char line[LINE_LEN], char *parse[MAX_TOKENS]));
|
||||
_PROTOTYPE(void check_mtab, (char *devname));
|
||||
_PROTOTYPE(long file_time, (int f));
|
||||
_PROTOTYPE(void pexit, (char *s));
|
||||
_PROTOTYPE(void copy, (char *from, char *to, int count));
|
||||
_PROTOTYPE(void print_fs, (void));
|
||||
_PROTOTYPE(int read_and_set, (block_t n));
|
||||
_PROTOTYPE(void special, (char *string));
|
||||
_PROTOTYPE(void get_block, (block_t n, char *buf));
|
||||
_PROTOTYPE(void get_super_block, (char *buf));
|
||||
_PROTOTYPE(void put_block, (block_t n, char *buf));
|
||||
_PROTOTYPE(void cache_init, (void));
|
||||
_PROTOTYPE(void flush, (void));
|
||||
_PROTOTYPE(void mx_read, (int blocknr, char *buf));
|
||||
_PROTOTYPE(void mx_write, (int blocknr, char *buf));
|
||||
_PROTOTYPE(void dexit, (char *s, int sectnum, int err));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(char *alloc_block, (void));
|
||||
int main(int argc, char **argv);
|
||||
block_t sizeup(char *device);
|
||||
void super(zone_t zones, Ino_t inodes);
|
||||
void rootdir(Ino_t inode);
|
||||
void eat_dir(Ino_t parent);
|
||||
void eat_file(Ino_t inode, int f);
|
||||
void enter_dir(Ino_t parent, char *name, Ino_t child);
|
||||
void incr_size(Ino_t n, long count);
|
||||
PRIVATE ino_t alloc_inode(int mode, int usrid, int grpid);
|
||||
PRIVATE zone_t alloc_zone(void);
|
||||
void add_zone(Ino_t n, zone_t z, long bytes, long cur_time);
|
||||
void add_z_1(Ino_t n, zone_t z, long bytes, long cur_time);
|
||||
void add_z_2(Ino_t n, zone_t z, long bytes, long cur_time);
|
||||
void incr_link(Ino_t n);
|
||||
void insert_bit(block_t block, int bit);
|
||||
int mode_con(char *p);
|
||||
void getline(char line[LINE_LEN], char *parse[MAX_TOKENS]);
|
||||
void check_mtab(char *devname);
|
||||
long file_time(int f);
|
||||
void pexit(char *s);
|
||||
void copy(char *from, char *to, int count);
|
||||
void print_fs(void);
|
||||
int read_and_set(block_t n);
|
||||
void special(char *string);
|
||||
void get_block(block_t n, char *buf);
|
||||
void get_super_block(char *buf);
|
||||
void put_block(block_t n, char *buf);
|
||||
void cache_init(void);
|
||||
void flush(void);
|
||||
void mx_read(int blocknr, char *buf);
|
||||
void mx_write(int blocknr, char *buf);
|
||||
void dexit(char *s, int sectnum, int err);
|
||||
void usage(void);
|
||||
char *alloc_block(void);
|
||||
|
||||
/*================================================================
|
||||
* mkfs - make filesystem
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char *argv []));
|
||||
_PROTOTYPE(void badcomm, (void));
|
||||
_PROTOTYPE(void badfifo, (void));
|
||||
_PROTOTYPE(void badchar, (void));
|
||||
_PROTOTYPE(void badblock, (void));
|
||||
int main(int argc, char *argv []);
|
||||
void badcomm(void);
|
||||
void badfifo(void);
|
||||
void badchar(void);
|
||||
void badblock(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -35,11 +35,11 @@ FILE *outfile;
|
|||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void descend, (char *dirname));
|
||||
_PROTOTYPE(void display_attrib, (char *name, struct stat *st));
|
||||
_PROTOTYPE(void usage, (char *binname));
|
||||
_PROTOTYPE(void open_outfile, (void));
|
||||
int main(int argc, char **argv);
|
||||
void descend(char *dirname);
|
||||
void display_attrib(char *name, struct stat *st);
|
||||
void usage(char *binname);
|
||||
void open_outfile(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
#define MINIX_FS_TYPE "mfs"
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void list, (void));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void list(void);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -15,19 +15,19 @@ char buf[512], buffer[BUFSIZ];
|
|||
int next;
|
||||
int bytespresent;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(long offset, (int argc, char *argv [], int k));
|
||||
_PROTOTYPE(void dumpfile, (void));
|
||||
_PROTOTYPE(void wdump, (short *words, int k, int radix));
|
||||
_PROTOTYPE(void bdump, (char bytes [16 ], int k, int c));
|
||||
_PROTOTYPE(void byte, (int val, int c));
|
||||
_PROTOTYPE(int getwords, (short **words));
|
||||
_PROTOTYPE(int same, (short *w1, int *w2));
|
||||
_PROTOTYPE(void outword, (int val, int radix));
|
||||
_PROTOTYPE(void outnum, (int num, int radix));
|
||||
_PROTOTYPE(void addrout, (long l));
|
||||
_PROTOTYPE(char hexit, (int k));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
long offset(int argc, char *argv [], int k);
|
||||
void dumpfile(void);
|
||||
void wdump(short *words, int k, int radix);
|
||||
void bdump(char bytes [16 ], int k, int c);
|
||||
void byte(int val, int c);
|
||||
int getwords(short **words);
|
||||
int same(short *w1, int *w2);
|
||||
void outword(int val, int radix);
|
||||
void outnum(int num, int radix);
|
||||
void addrout(long l);
|
||||
char hexit(int k);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -90,11 +90,11 @@ static char default_delims[] = {TAB}; /* default delimiter string */
|
|||
char *delims; /* the pointer to the delimiters */
|
||||
int number_of_delims = 1; /* number of delimiters to use */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void docol, (int nfiles, char **fnamptr));
|
||||
_PROTOTYPE(void doserial, (int nfiles, char **fnamptr));
|
||||
_PROTOTYPE(void delimbuild, (char *strptr));
|
||||
_PROTOTYPE(void prerr, (int etype, char *estring));
|
||||
int main(int argc, char **argv);
|
||||
void docol(int nfiles, char **fnamptr);
|
||||
void doserial(int nfiles, char **fnamptr);
|
||||
void delimbuild(char *strptr);
|
||||
void prerr(int etype, char *estring);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include <minix/sound.h>
|
||||
|
||||
_PROTOTYPE( int main, (int argc, char **argv));
|
||||
_PROTOTYPE( void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void usage(void);
|
||||
|
||||
/******* Wave format definitions *********/
|
||||
|
||||
|
|
|
@ -93,14 +93,14 @@ char *line_buf; /* used in format for multi-column output */
|
|||
|
||||
char output[1024];
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(static char *myalloc, (size_t size));
|
||||
_PROTOTYPE(char skip_page, (int lines, int width, FILE * filep));
|
||||
_PROTOTYPE(void format, (FILE * filep));
|
||||
_PROTOTYPE(void print_page, (int pagenr, int maxcol));
|
||||
_PROTOTYPE(void print, (FILE * filep));
|
||||
_PROTOTYPE(void out_header, (int page));
|
||||
_PROTOTYPE(void print_time, (time_t t));
|
||||
int main(int argc, char **argv);
|
||||
static char *myalloc(size_t size);
|
||||
char skip_page(int lines, int width, FILE * filep);
|
||||
void format(FILE * filep);
|
||||
void print_page(int pagenr, int maxcol);
|
||||
void print(FILE * filep);
|
||||
void out_header(int page);
|
||||
void print_time(time_t t);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
int lfread; /* set when last char read was lf */
|
||||
int lfwritten = 1; /* set when last char written was lf */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void skipline, (void));
|
||||
_PROTOTYPE(int backslash, (void));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
void skipline(void);
|
||||
int backslash(void);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -32,8 +32,8 @@ static char MESSAGE[] = " / "; /* ditto */
|
|||
#define ROOT "/"
|
||||
int rflag;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void done, (char *name, int status));
|
||||
int main(int argc, char **argv);
|
||||
void done(char *name, int status);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -66,16 +66,16 @@ struct sproc {
|
|||
|
||||
static struct sproc * proc_hash[HASH_MOD];
|
||||
|
||||
_PROTOTYPE(int handle_args, (int argc, char *argv[]));
|
||||
_PROTOTYPE(int start, (void));
|
||||
_PROTOTYPE(int stop, (void));
|
||||
_PROTOTYPE(int get, (void));
|
||||
_PROTOTYPE(int reset, (void));
|
||||
_PROTOTYPE(int create_named_pipe, (void));
|
||||
_PROTOTYPE(int alloc_mem, (void));
|
||||
_PROTOTYPE(int init_outfile, (void));
|
||||
_PROTOTYPE(int write_outfile, (void));
|
||||
_PROTOTYPE(int detach, (void));
|
||||
int handle_args(int argc, char *argv[]);
|
||||
int start(void);
|
||||
int stop(void);
|
||||
int get(void);
|
||||
int reset(void);
|
||||
int create_named_pipe(void);
|
||||
int alloc_mem(void);
|
||||
int init_outfile(void);
|
||||
int write_outfile(void);
|
||||
int detach(void);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
void
|
||||
prettyprogress(long b, long maxb, time_t starttime)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
PROG= proto
|
||||
MAN=
|
||||
|
||||
.include <bsd.prog.mk>
|
|
@ -1,688 +0,0 @@
|
|||
/* proto - Generate ANSI C prototypes. Author: Eric R. Smith */
|
||||
|
||||
/* Program to extract function declarations from C source code
|
||||
* Written by Eric R. Smith and placed in the public domain
|
||||
* Thanks are due to Jwahar R. Bammi for fixing several bugs
|
||||
* And providing the Unix makefiles.
|
||||
*/
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define ISCSYM(x) ((x) > 0 && (isalnum(x) || (x) == '_' ))
|
||||
#define ABORTED ( (Word *) -1 )
|
||||
#define MAXPARAM 20 /* max. number of parameters to a function */
|
||||
|
||||
typedef struct word {
|
||||
struct word *next;
|
||||
char string[1];
|
||||
} Word;
|
||||
|
||||
int inquote = 0; /* in a quote? */
|
||||
int newline_seen = 1; /* are we at the start of a line */
|
||||
long linenum = 1L; /* line number in current file */
|
||||
long endline = 0L; /* the last line before the { of a f'n */
|
||||
long symline = 0L; /* Line that symbol was on, set by getsym() */
|
||||
int dostatic = 0; /* do static functions? */
|
||||
int donum = 0; /* print line numbers? */
|
||||
int dohead = 1; /* do file headers? */
|
||||
int docond = 1; /* conditionalize for non-ANSI compilers? */
|
||||
int dodiff = 0; /* Output a diff file to prototype original */
|
||||
int doold = 0; /* do old style: P() */
|
||||
int glastc = ' '; /* last char. seen by getsym() */
|
||||
Word *endlist; /* Parentheses after the parameters */
|
||||
char *progname; /* name of program (for error messages) */
|
||||
|
||||
|
||||
_PROTOTYPE(Word * word_alloc, (char *s));
|
||||
_PROTOTYPE(void word_free, (Word * w));
|
||||
_PROTOTYPE(int List_len, (Word * w));
|
||||
_PROTOTYPE(Word * word_append, (Word * w1, Word * w2));
|
||||
_PROTOTYPE(int foundin, (Word * w1, Word * w2));
|
||||
_PROTOTYPE(void addword, (Word * w, char *s));
|
||||
_PROTOTYPE(void printlist, (Word * p));
|
||||
_PROTOTYPE(Word * typelist, (Word * p));
|
||||
_PROTOTYPE(void typefixhack, (Word * w));
|
||||
_PROTOTYPE(int ngetc, (FILE * f));
|
||||
_PROTOTYPE(int fnextch, (FILE * f));
|
||||
_PROTOTYPE(int nextch, (FILE * f));
|
||||
_PROTOTYPE(int getsym, (char *buf, FILE * f));
|
||||
_PROTOTYPE(int skipit, (char *buf, FILE * f));
|
||||
_PROTOTYPE(Word * getparamlist, (FILE * f));
|
||||
_PROTOTYPE(void emit, (Word * wlist, Word * plist, long startline));
|
||||
_PROTOTYPE(void getdecl, (FILE * f));
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void Usage, (void));
|
||||
|
||||
/* Routines for manipulating lists of words. */
|
||||
|
||||
Word *word_alloc(s)
|
||||
char *s;
|
||||
{
|
||||
Word *w;
|
||||
|
||||
w = (Word *) malloc(sizeof(Word) + strlen(s) + 1);
|
||||
if (w == NULL) {
|
||||
fprintf(stderr, "%s: out of memory\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
(void) strcpy(w->string, s);
|
||||
w->next = NULL;
|
||||
return w;
|
||||
}
|
||||
|
||||
void word_free(w)
|
||||
Word *w;
|
||||
{
|
||||
Word *oldw;
|
||||
while (w) {
|
||||
oldw = w;
|
||||
w = w->next;
|
||||
free((char *) oldw);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the length of a list; empty words are not counted */
|
||||
int List_len(w)
|
||||
Word *w;
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
while (w) {
|
||||
if (*w->string) count++;
|
||||
w = w->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/* Append two lists, and return the result */
|
||||
Word *word_append(w1, w2)
|
||||
Word *w1, *w2;
|
||||
{
|
||||
Word *r, *w;
|
||||
|
||||
r = w = word_alloc("");
|
||||
|
||||
while (w1) {
|
||||
w->next = word_alloc(w1->string);
|
||||
w = w->next;
|
||||
w1 = w1->next;
|
||||
}
|
||||
while (w2) {
|
||||
w->next = word_alloc(w2->string);
|
||||
w = w->next;
|
||||
w2 = w2->next;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* See if the last entry in w2 is in w1 */
|
||||
int foundin(w1, w2)
|
||||
Word *w1, *w2;
|
||||
{
|
||||
while (w2->next) w2 = w2->next;
|
||||
|
||||
while (w1) {
|
||||
if (!strcmp(w1->string, w2->string)) return 1;
|
||||
w1 = w1->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add the string s to the given list of words */
|
||||
void addword(w, s)
|
||||
Word *w;
|
||||
char *s;
|
||||
{
|
||||
while (w->next) w = w->next;
|
||||
w->next = word_alloc(s);
|
||||
}
|
||||
|
||||
/* Printlist: print out a list */
|
||||
void printlist(p)
|
||||
Word *p;
|
||||
{
|
||||
Word *w;
|
||||
int i = 0;
|
||||
|
||||
for (w = p; w; w = w->next) {
|
||||
printf("%s", w->string);
|
||||
if (ISCSYM(w->string[0]) && i > 0
|
||||
&& w->next && w->next->string[0] != ',') printf(" ");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Given a list representing a type and a variable name, extract just
|
||||
* the base type, e.g. "struct word *x" would yield "struct word".
|
||||
* Similarly, "unsigned char x[]" would yield "unsigned char".
|
||||
*/
|
||||
Word *typelist(p)
|
||||
Word *p;
|
||||
{
|
||||
Word *w, *r, *last;
|
||||
|
||||
last = r = w = word_alloc("");
|
||||
while (p && p->next) {
|
||||
if (p->string[0] == '[') {
|
||||
word_free(w);
|
||||
last->next = NULL;
|
||||
break;
|
||||
}
|
||||
if (p->string[0] && !ISCSYM(p->string[0])) break;
|
||||
w->next = word_alloc(p->string);
|
||||
last = w;
|
||||
w = w->next;
|
||||
p = p->next;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Typefixhack: promote formal parameters of type "char", "unsigned char",
|
||||
* "short", or "unsigned short" to "int".
|
||||
*/
|
||||
void typefixhack(w)
|
||||
Word *w;
|
||||
{
|
||||
Word *oldw = 0;
|
||||
|
||||
while (w) {
|
||||
if (*w->string) {
|
||||
if ((!strcmp(w->string, "char") ||
|
||||
!strcmp(w->string, "short"))
|
||||
&& (List_len(w->next) < 2)) {
|
||||
if (oldw && !strcmp(oldw->string, "unsigned")) {
|
||||
oldw->next = w->next;
|
||||
free((char *) w);
|
||||
w = oldw;
|
||||
}
|
||||
(void) strcpy(w->string, "int");
|
||||
}
|
||||
}
|
||||
w = w->next;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read a character: if it's a newline, increment the line count */
|
||||
int ngetc(f)
|
||||
FILE *f;
|
||||
{
|
||||
int c;
|
||||
|
||||
c = getc(f);
|
||||
if (c == '\n') linenum++;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Read the next character from the file. If the character is '\' then
|
||||
* read and skip the next character. Any comment sequence is converted
|
||||
* to a blank.
|
||||
*/
|
||||
int fnextch(f)
|
||||
FILE *f;
|
||||
{
|
||||
int c, lastc, incomment;
|
||||
|
||||
c = ngetc(f);
|
||||
while (c == '\\') {
|
||||
c = ngetc(f); /* skip a character */
|
||||
c = ngetc(f);
|
||||
}
|
||||
if (c == '/' && !inquote) {
|
||||
c = ngetc(f);
|
||||
if (c == '*') {
|
||||
incomment = 1;
|
||||
c = ' ';
|
||||
while (incomment) {
|
||||
lastc = c;
|
||||
c = ngetc(f);
|
||||
if (lastc == '*' && c == '/')
|
||||
incomment = 0;
|
||||
else if (c < 0)
|
||||
return c;
|
||||
}
|
||||
return fnextch(f);
|
||||
} else {
|
||||
if (c == '\n') linenum--;
|
||||
(void) ungetc(c, f);
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
/* Get the next "interesting" character. Comments are skipped, and strings
|
||||
* are converted to "0". Also, if a line starts with "#" it is skipped.
|
||||
*/
|
||||
int nextch(f)
|
||||
FILE *f;
|
||||
{
|
||||
int c;
|
||||
|
||||
c = fnextch(f);
|
||||
if (newline_seen && c == '#') {
|
||||
do {
|
||||
c = fnextch(f);
|
||||
} while (c >= 0 && c != '\n');
|
||||
if (c < 0) return c;
|
||||
}
|
||||
newline_seen = (c == '\n');
|
||||
|
||||
if (c == '\'' || c == '\"') {
|
||||
inquote = c;
|
||||
while ((c = fnextch(f)) >= 0) {
|
||||
if (c == inquote) {
|
||||
inquote = 0;
|
||||
return '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Get the next symbol from the file, skipping blanks.
|
||||
* Return 0 if OK, -1 for EOF.
|
||||
* Also collapses everything between { and }
|
||||
*/
|
||||
int getsym(buf, f)
|
||||
char *buf;
|
||||
FILE *f;
|
||||
{
|
||||
register int c;
|
||||
int inbrack = 0;
|
||||
|
||||
c = glastc;
|
||||
while ((c > 0) && isspace(c)) c = nextch(f);
|
||||
if (c < 0) return -1;
|
||||
if (c == '{') {
|
||||
inbrack = 1;
|
||||
endline = linenum;
|
||||
while (inbrack) {
|
||||
c = nextch(f);
|
||||
if (c < 0) {
|
||||
glastc = c;
|
||||
return c;
|
||||
}
|
||||
if (c == '{')
|
||||
inbrack++;
|
||||
else if (c == '}')
|
||||
inbrack--;
|
||||
}
|
||||
(void) strcpy(buf, "{}");
|
||||
glastc = nextch(f);
|
||||
return 0;
|
||||
}
|
||||
if (!ISCSYM(c)) {
|
||||
*buf++ = c;
|
||||
glastc = nextch(f);
|
||||
if (c == '(' && glastc == '*') { /* Look for a 'f'n pointer */
|
||||
*buf++ = glastc;
|
||||
glastc = nextch(f);
|
||||
}
|
||||
*buf = 0;
|
||||
return 0;
|
||||
}
|
||||
symline = linenum;
|
||||
while (ISCSYM(c)) {
|
||||
*buf++ = c;
|
||||
c = nextch(f);
|
||||
}
|
||||
*buf = 0;
|
||||
glastc = c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Skipit: skip until a ";" or the end of a function declaration is seen */
|
||||
int skipit(buf, f)
|
||||
char *buf;
|
||||
FILE *f;
|
||||
{
|
||||
int i;
|
||||
|
||||
do {
|
||||
i = getsym(buf, f);
|
||||
if (i < 0) return i;
|
||||
} while (*buf != ';' && *buf != '{');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get a parameter list; when this is called the next symbol in line
|
||||
* should be the first thing in the list.
|
||||
*/
|
||||
Word *getparamlist(f)
|
||||
FILE *f;
|
||||
{
|
||||
static Word *pname[MAXPARAM]; /* parameter names */
|
||||
Word *tlist, /* type name */
|
||||
*plist; /* temporary */
|
||||
int np = 0; /* number of parameters */
|
||||
int typed[MAXPARAM]; /* parameter has been given a type */
|
||||
int tlistdone; /* finished finding the type name */
|
||||
int sawsomething;
|
||||
int i;
|
||||
int inparen = 0;
|
||||
char buf[80];
|
||||
|
||||
for (i = 0; i < MAXPARAM; i++) typed[i] = 0;
|
||||
|
||||
plist = word_alloc("");
|
||||
endlist = word_alloc("");
|
||||
|
||||
/* First, get the stuff inside brackets (if anything) */
|
||||
|
||||
sawsomething = 0; /* gets set nonzero when we see an arg */
|
||||
for (;;) {
|
||||
if (getsym(buf, f) < 0) return(NULL);
|
||||
if (*buf == ')' && (--inparen < 0)) {
|
||||
if (sawsomething) { /* if we've seen an arg */
|
||||
pname[np] = plist;
|
||||
plist = word_alloc("");
|
||||
np++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (*buf == ';') { /* something weird */
|
||||
return ABORTED;
|
||||
}
|
||||
sawsomething = 1; /* there's something in the arg. list */
|
||||
if (*buf == ',' && inparen == 0) {
|
||||
pname[np] = plist;
|
||||
plist = word_alloc("");
|
||||
np++;
|
||||
} else {
|
||||
addword(plist, buf);
|
||||
if (*buf == '(') inparen++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Next, get the declarations after the function header */
|
||||
inparen = 0;
|
||||
tlist = word_alloc("");
|
||||
plist = word_alloc("");
|
||||
tlistdone = 0;
|
||||
sawsomething = 0;
|
||||
for (;;) {
|
||||
if (getsym(buf, f) < 0) return(NULL);
|
||||
|
||||
/* Handle parentheses, which should indicate func pointer rtn values */
|
||||
if (*buf == '(') {
|
||||
addword(endlist, buf);
|
||||
addword(endlist, " void ");
|
||||
inparen++;
|
||||
} else if (*buf == ')') {
|
||||
if (symline == linenum) {
|
||||
addword(endlist, buf);
|
||||
addword(endlist, buf);
|
||||
}
|
||||
inparen--;
|
||||
} else if (*buf == ',' && !inparen) {
|
||||
/* Handle a list like "int x,y,z" */
|
||||
if (!sawsomething) return(NULL);
|
||||
for (i = 0; i < np; i++) {
|
||||
if (!typed[i] && foundin(plist, pname[i])) {
|
||||
typed[i] = 1;
|
||||
word_free(pname[i]);
|
||||
pname[i] = word_append(tlist, plist);
|
||||
/* Promote types */
|
||||
typefixhack(pname[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!tlistdone) {
|
||||
tlist = typelist(plist);
|
||||
tlistdone = 1;
|
||||
}
|
||||
word_free(plist);
|
||||
plist = word_alloc("");
|
||||
} else if (*buf == ';') {
|
||||
/* Handle the end of a list */
|
||||
if (!sawsomething) return ABORTED;
|
||||
for (i = 0; i < np; i++) {
|
||||
if (!typed[i] && foundin(plist, pname[i])) {
|
||||
typed[i] = 1;
|
||||
word_free(pname[i]);
|
||||
pname[i] = word_append(tlist, plist);
|
||||
typefixhack(pname[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
tlistdone = 0;
|
||||
word_free(tlist);
|
||||
word_free(plist);
|
||||
tlist = word_alloc("");
|
||||
plist = word_alloc("");
|
||||
} else if (!strcmp(buf, "{}"))
|
||||
break; /* Handle the beginning of the function */
|
||||
/* Otherwise, throw word into list (except for "register") */
|
||||
else if (strcmp(buf, "register")) {
|
||||
sawsomething = 1;
|
||||
addword(plist, buf);
|
||||
if (*buf == '(') inparen++;
|
||||
if (*buf == ')') inparen--;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now take the info we have and build a prototype list */
|
||||
|
||||
/* Empty parameter list means "void" */
|
||||
if (np == 0) return word_alloc("void");
|
||||
|
||||
plist = tlist = word_alloc("");
|
||||
for (i = 0; i < np; i++) {
|
||||
|
||||
/* If no type provided, make it an "int" */
|
||||
if (!(pname[i]->next) ||
|
||||
(!(pname[i]->next->next)&&strcmp(pname[i]->next->string,"void"))) {
|
||||
addword(tlist, "int");
|
||||
}
|
||||
while (tlist->next) tlist = tlist->next;
|
||||
tlist->next = pname[i];
|
||||
if (i < np - 1) addword(tlist, ", ");
|
||||
}
|
||||
return plist;
|
||||
}
|
||||
|
||||
/* Emit a function declaration. The attributes and name of the function
|
||||
* are in wlist; the parameters are in plist.
|
||||
*/
|
||||
void emit(wlist, plist, startline)
|
||||
Word *wlist, *plist;
|
||||
long startline;
|
||||
{
|
||||
Word *w;
|
||||
int count = 0;
|
||||
|
||||
if (doold == 0) printf("_PROTOTYPE( ");
|
||||
if (dodiff) {
|
||||
printf("%lda%ld,%ld\n", startline - 1, startline, startline +2);
|
||||
printf("> #ifdef __STDC__\n> ");
|
||||
}
|
||||
if (donum) printf("/*%8ld */ ", startline);
|
||||
for (w = wlist; w; w = w->next) {
|
||||
if (w->string[0]) count++;
|
||||
}
|
||||
if (count < 2) printf("int ");
|
||||
printlist(wlist);
|
||||
if (docond) {
|
||||
if (doold)
|
||||
printf(" P((");
|
||||
else
|
||||
printf(", (");
|
||||
} else {
|
||||
printf("(");
|
||||
}
|
||||
|
||||
printlist(plist);
|
||||
printlist(endlist);
|
||||
|
||||
if (docond) {
|
||||
if (doold)
|
||||
printf("))");
|
||||
else
|
||||
printf(") )");
|
||||
} else {
|
||||
printf(")");
|
||||
}
|
||||
|
||||
if (!dodiff)
|
||||
printf(";\n");
|
||||
else
|
||||
printf("\n");
|
||||
|
||||
if (dodiff) {
|
||||
printf("> #else\n");
|
||||
printf("%lda%ld\n", endline - 1, endline);
|
||||
printf("> #endif\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Get all the function declarations */
|
||||
void getdecl(f)
|
||||
FILE *f;
|
||||
{
|
||||
Word *plist, *wlist = NULL;
|
||||
char buf[80];
|
||||
int sawsomething;
|
||||
long startline = 0L; /* line where declaration started */
|
||||
int oktoprint;
|
||||
|
||||
again: /* SHAME SHAME */
|
||||
word_free(wlist);
|
||||
wlist = word_alloc("");
|
||||
sawsomething = 0;
|
||||
oktoprint = 1;
|
||||
|
||||
for (;;) {
|
||||
if (getsym(buf, f) < 0) return;
|
||||
|
||||
/* Guess when a declaration is not an external function definition */
|
||||
if (!strcmp(buf, ",") || !strcmp(buf, "{}") ||
|
||||
!strcmp(buf, "=") || !strcmp(buf, "typedef") ||
|
||||
!strcmp(buf, "extern")) {
|
||||
(void) skipit(buf, f);
|
||||
goto again;
|
||||
}
|
||||
if (!dostatic && !strcmp(buf, "static")) oktoprint = 0;
|
||||
|
||||
/* For the benefit of compilers that allow "inline" declarations */
|
||||
if (!strcmp(buf, "inline") && !sawsomething) continue;
|
||||
if (!strcmp(buf, ";")) goto again;
|
||||
|
||||
/* A left parenthesis *might* indicate a function definition */
|
||||
if (!strcmp(buf, "(")) {
|
||||
if (!sawsomething || !(plist = getparamlist(f))) {
|
||||
(void) skipit(buf, f);
|
||||
goto again;
|
||||
}
|
||||
if (plist == ABORTED) goto again;
|
||||
|
||||
/* It seems to have been what we wanted */
|
||||
if (oktoprint) emit(wlist, plist, startline);
|
||||
word_free(plist);
|
||||
goto again;
|
||||
}
|
||||
addword(wlist, buf);
|
||||
if (!sawsomething) startline = symline;
|
||||
sawsomething = 1;
|
||||
}
|
||||
}
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
FILE *f, *g;
|
||||
char *t;
|
||||
char newname[40];
|
||||
|
||||
progname = argv[0];
|
||||
argv++;
|
||||
argc--;
|
||||
g = stdout;
|
||||
|
||||
while (*argv && **argv == '-') {
|
||||
t = *argv++;
|
||||
--argc;
|
||||
t++;
|
||||
while (*t) {
|
||||
if (*t == 's')
|
||||
dostatic = 1;
|
||||
else if (*t == 'n')
|
||||
donum = 1;
|
||||
else if (*t == 'p')
|
||||
docond = 0;
|
||||
else if (*t == 'P')
|
||||
doold =1;
|
||||
else if (*t == 'd') {
|
||||
dodiff = 1;
|
||||
doold = 1;
|
||||
docond = 0;
|
||||
donum = 0;
|
||||
dostatic = 1;
|
||||
} else
|
||||
Usage();
|
||||
t++;
|
||||
}
|
||||
}
|
||||
|
||||
if (docond && doold) {
|
||||
printf("#ifdef __STDC__\n");
|
||||
printf("# define P(args)\targs\n");
|
||||
printf("#else\n");
|
||||
printf("# define P(args)\t()\n");
|
||||
printf("#endif\n\n");
|
||||
}
|
||||
if (argc == 0)
|
||||
getdecl(stdin);
|
||||
else
|
||||
while (argc > 0 && *argv) {
|
||||
if (!(f = fopen(*argv, "r"))) {
|
||||
perror(*argv);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#if 0
|
||||
if (dodiff) {
|
||||
(void) sprintf(newname, "%sdif", *argv);
|
||||
(void) fclose(g);
|
||||
if (!(g = fopen(newname, "w"))) {
|
||||
perror(newname);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (doold && dohead && !dodiff) printf("\n/* %s */\n", *argv);
|
||||
linenum = 1;
|
||||
newline_seen = 1;
|
||||
glastc = ' ';
|
||||
getdecl(f);
|
||||
argc--;
|
||||
argv++;
|
||||
(void) fclose(f);
|
||||
}
|
||||
if (docond && doold) printf("\n#undef P\n"); /* clean up namespace */
|
||||
(void) fclose(g);
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
void Usage()
|
||||
{
|
||||
fputs("Usage: ", stderr);
|
||||
fputs(progname, stderr);
|
||||
fputs(" [-d][-n][-p][-s] [files ...]\n", stderr);
|
||||
fputs(" -P: use P() style instead of _PROTOTYPE\n", stderr);
|
||||
fputs(" -d: produce a diff file to prototype original source\n", stderr);
|
||||
fputs(" -n: put line numbers of declarations as comments\n", stderr);
|
||||
fputs(" -p: don't make header files readable by K&R compilers\n", stderr);
|
||||
fputs(" -s: include declarations for static functions\n", stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
|
@ -120,13 +120,13 @@ struct pstat { /* structure filled by pstat() */
|
|||
char *ps_args; /* concatenated argument string */
|
||||
};
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char *argv []));
|
||||
_PROTOTYPE(void plist, (void));
|
||||
_PROTOTYPE(int addrread, (int fd, phys_clicks base, vir_bytes addr,
|
||||
char *buf, int nbytes ));
|
||||
_PROTOTYPE(void usage, (const char *pname ));
|
||||
_PROTOTYPE(void err, (const char *s ));
|
||||
_PROTOTYPE(int gettynames, (void));
|
||||
int main(int argc, char *argv []);
|
||||
void plist(void);
|
||||
int addrread(int fd, phys_clicks base, vir_bytes addr, char *buf, int
|
||||
nbytes );
|
||||
void usage(const char *pname );
|
||||
void err(const char *s );
|
||||
int gettynames(void);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define SUCCESS 0 /* exit code in case of success */
|
||||
#define FAILURE 1 /* or failure */
|
||||
|
||||
_PROTOTYPE(int main, (void));
|
||||
int main(void);
|
||||
|
||||
static char dir[PATH_MAX + 1];
|
||||
static char *errmsg = "pwd: cannot search some directory on the path\n";
|
||||
|
|
|
@ -41,8 +41,8 @@ char *name; /* name of special file being read */
|
|||
char a[CHUNK * BLOCK_SIZE]; /* read buffer */
|
||||
long rotten[STORE]; /* list of bad blocks */
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
static _PROTOTYPE(void output, (long blocks_read));
|
||||
int main(int argc, char **argv);
|
||||
static void output(long blocks_read);
|
||||
|
||||
/* print pretty progress meter with remaining no. of blocks and ETA on
|
||||
* stderr
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include <minix/sound.h>
|
||||
|
||||
_PROTOTYPE (int main, (int argc, char **argv));
|
||||
_PROTOTYPE (void usage, (void));
|
||||
_PROTOTYPE ( void write_wave_header, (void));
|
||||
_PROTOTYPE ( void terminate, (int s));
|
||||
int main(int argc, char **argv);
|
||||
void usage(void);
|
||||
void write_wave_header(void);
|
||||
void terminate(int s);
|
||||
|
||||
|
||||
/******* Wave format definitions *********/
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
char *default_core = "core";
|
||||
int stack[STACK_BYTES / sizeof (int)];
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void read_segmap, (int fd, struct mproc *mp, long *seg_size));
|
||||
_PROTOTYPE(void read_registers, (int fd, struct proc *p));
|
||||
_PROTOTYPE(void dump_stack, (int fd, struct mproc *mp, long *seg_size));
|
||||
_PROTOTYPE(void error, (char *s1, char *s2));
|
||||
int main(int argc, char **argv);
|
||||
void read_segmap(int fd, struct mproc *mp, long *seg_size);
|
||||
void read_registers(int fd, struct proc *p);
|
||||
void dump_stack(int fd, struct mproc *mp, long *seg_size);
|
||||
void error(char *s1, char *s2);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* shar - make a shell archive Author: Michiel Husijes */
|
||||
|
||||
#include <stdlib.h> /* for the nonstd :-( _PROTOTYPE */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static _PROTOTYPE( void error, (char *progname, char *operation,
|
||||
char *filename) );
|
||||
_PROTOTYPE( int main, (int argc, char **argv) );
|
||||
static void error(char *progname, char *operation, char *filename);
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <unistd.h>
|
||||
#include <minix/minlib.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -129,40 +129,40 @@ int disabled; /* Nr of files done */
|
|||
char USAGE[] = "Usage: sort [-funbirdcmt'x'] [+beg_pos [-end_pos]] [-o outfile] [file] ..";
|
||||
|
||||
/* Forward declarations */
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void get_opts, (char *ptr, FIELD * field));
|
||||
_PROTOTYPE(void new_field, (FIELD * field, int *offset, BOOL beg_fl));
|
||||
_PROTOTYPE(void adjust_options, (FIELD * field));
|
||||
_PROTOTYPE(void error, (BOOL quit, char *message, char *arg));
|
||||
_PROTOTYPE(void open_outfile, (void));
|
||||
_PROTOTYPE(void get_file, (int fd, off_t size));
|
||||
_PROTOTYPE(int last_line, (void));
|
||||
_PROTOTYPE(void print_table, (int fd));
|
||||
_PROTOTYPE(char *file_name, (int nr));
|
||||
_PROTOTYPE(void mread, (int fd, char *address, int bytes));
|
||||
_PROTOTYPE(void mwrite, (int fd, char *address, int bytes));
|
||||
_PROTOTYPE(void sort, (void));
|
||||
_PROTOTYPE(void sort_table, (int nel));
|
||||
_PROTOTYPE(void incr, (int si, int ei));
|
||||
_PROTOTYPE(int cmp_fields, (char *el1, char *el2));
|
||||
_PROTOTYPE(void build_field, (char *dest, FIELD * field, char *src));
|
||||
_PROTOTYPE(char *skip_fields, (char *str, int nf));
|
||||
_PROTOTYPE(int compare, (char *el1, char *el2));
|
||||
_PROTOTYPE(int cmp, (unsigned char *el1, unsigned char *el2, FIELD * field));
|
||||
_PROTOTYPE(int digits, (char *str1, char *str2, BOOL check_sign));
|
||||
_PROTOTYPE(void files_merge, (int file_cnt));
|
||||
_PROTOTYPE(void merge, (int start_file, int limit_file));
|
||||
_PROTOTYPE(void put_line, (char *line));
|
||||
_PROTOTYPE(MERGE * print, (MERGE * merg, int file_cnt));
|
||||
_PROTOTYPE(int read_line, (MERGE * merg));
|
||||
_PROTOTYPE(MERGE * skip_lines, (MERGE * smallest, int file_cnt));
|
||||
_PROTOTYPE(void uniq_lines, (MERGE * merg));
|
||||
_PROTOTYPE(void check_file, (int fd, char *file));
|
||||
_PROTOTYPE(int length, (char *line));
|
||||
_PROTOTYPE(void copy, (char *dest, char *src));
|
||||
_PROTOTYPE(char *msbrk, (int size));
|
||||
_PROTOTYPE(void mbrk, (char *address));
|
||||
_PROTOTYPE(void catch, (int dummy));
|
||||
int main(int argc, char **argv);
|
||||
void get_opts(char *ptr, FIELD * field);
|
||||
void new_field(FIELD * field, int *offset, BOOL beg_fl);
|
||||
void adjust_options(FIELD * field);
|
||||
void error(BOOL quit, char *message, char *arg);
|
||||
void open_outfile(void);
|
||||
void get_file(int fd, off_t size);
|
||||
int last_line(void);
|
||||
void print_table(int fd);
|
||||
char *file_name(int nr);
|
||||
void mread(int fd, char *address, int bytes);
|
||||
void mwrite(int fd, char *address, int bytes);
|
||||
void sort(void);
|
||||
void sort_table(int nel);
|
||||
void incr(int si, int ei);
|
||||
int cmp_fields(char *el1, char *el2);
|
||||
void build_field(char *dest, FIELD * field, char *src);
|
||||
char *skip_fields(char *str, int nf);
|
||||
int compare(char *el1, char *el2);
|
||||
int cmp(unsigned char *el1, unsigned char *el2, FIELD * field);
|
||||
int digits(char *str1, char *str2, BOOL check_sign);
|
||||
void files_merge(int file_cnt);
|
||||
void merge(int start_file, int limit_file);
|
||||
void put_line(char *line);
|
||||
MERGE * print(MERGE * merg, int file_cnt);
|
||||
int read_line(MERGE * merg);
|
||||
MERGE * skip_lines(MERGE * smallest, int file_cnt);
|
||||
void uniq_lines(MERGE * merg);
|
||||
void check_file(int fd, char *file);
|
||||
int length(char *line);
|
||||
void copy(char *dest, char *src);
|
||||
char *msbrk(int size);
|
||||
void mbrk(char *address);
|
||||
void catch(int dummy);
|
||||
|
||||
/* Table of all chars. 0 means no special meaning. */
|
||||
char table[256] = {
|
||||
|
|
|
@ -14,11 +14,11 @@ int infile;
|
|||
char out_file[100];
|
||||
char *suffix;
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void split, (void));
|
||||
_PROTOTYPE(int newfile, (void));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(void quit, (void));
|
||||
int main(int argc, char **argv);
|
||||
void split(void);
|
||||
int newfile(void);
|
||||
void usage(void);
|
||||
void quit(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#endif
|
||||
#include <minix/minlib.h>
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -24,10 +24,10 @@ int rc = 0;
|
|||
|
||||
char *defargv[] = {"-", 0};
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(void error, (char *s, char *f));
|
||||
_PROTOTYPE(void sum, (int fd, char *fname));
|
||||
_PROTOTYPE(void putd, (int number, int fw, int zeros));
|
||||
int main(int argc, char **argv);
|
||||
void error(char *s, char *f);
|
||||
void sum(int fd, char *fname);
|
||||
void putd(int number, int fw, int zeros);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
_PROTOTYPE(int main, (void));
|
||||
int main(void);
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
@ -79,10 +79,10 @@ extern int optind;
|
|||
#define TRUE 1
|
||||
|
||||
/* Internal functions - prototyped under Minix */
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
_PROTOTYPE(int tail, (int count, int bytes, int read_until_killed));
|
||||
_PROTOTYPE(int keep_reading, (void));
|
||||
_PROTOTYPE(void usage, (void));
|
||||
int main(int argc, char **argv);
|
||||
int tail(int count, int bytes, int read_until_killed);
|
||||
int keep_reading(void);
|
||||
void usage(void);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
int fd[MAXFD];
|
||||
|
||||
_PROTOTYPE(int main, (int argc, char **argv));
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
|
|
|
@ -41,10 +41,9 @@ static char *Version = "@(#) telnetd 1.00 (07/26/92)";
|
|||
|
||||
int opt_d = 0; /* debugging output flag */
|
||||
|
||||
_PROTOTYPE(void usage, (void));
|
||||
_PROTOTYPE(int main, (int argc, char *argv[]));
|
||||
_PROTOTYPE(void wtmp, (int type, int linenr, char *line, pid_t pid,
|
||||
char *host));
|
||||
void usage(void);
|
||||
int main(int argc, char *argv[]);
|
||||
void wtmp(int type, int linenr, char *line, pid_t pid, char *host);
|
||||
|
||||
void usage()
|
||||
{
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#define IN_IAC2 3
|
||||
#define IN_SB 4
|
||||
|
||||
_PROTOTYPE(static void dowill, (int c));
|
||||
_PROTOTYPE(static void dowont, (int c));
|
||||
_PROTOTYPE(static void dodo, (int c));
|
||||
_PROTOTYPE(static void dodont, (int c));
|
||||
_PROTOTYPE(static void respond, (int ack, int option));
|
||||
_PROTOTYPE(static void respond_really, (int ack, int option));
|
||||
static void dowill(int c);
|
||||
static void dowont(int c);
|
||||
static void dodo(int c);
|
||||
static void dodont(int c);
|
||||
static void respond(int ack, int option);
|
||||
static void respond_really(int ack, int option);
|
||||
|
||||
#define LASTTELOPT TELOPT_SGA
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
extern int opt_d; /* debugging flag */
|
||||
|
||||
_PROTOTYPE(int get_pty, (int *, char **));
|
||||
_PROTOTYPE(void term_init, (void));
|
||||
_PROTOTYPE(void term_inout, (int pty_fd));
|
||||
_PROTOTYPE(void tel_init, (void));
|
||||
_PROTOTYPE(void telopt, (int fdout, int what, int option));
|
||||
_PROTOTYPE(int tel_in, (int fdout, int telout, char *buffer, int len));
|
||||
_PROTOTYPE(int tel_out, (int fdout, char *buf, int size));
|
||||
int get_pty(int *, char **);
|
||||
void term_init(void);
|
||||
void term_inout(int pty_fd);
|
||||
void tel_init(void);
|
||||
void telopt(int fdout, int what, int option);
|
||||
int tel_in(int fdout, int telout, char *buffer, int len);
|
||||
int tel_out(int fdout, char *buf, int size);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "telnet.h"
|
||||
#include "telnetd.h"
|
||||
|
||||
_PROTOTYPE(void sig_done, (int sig));
|
||||
void sig_done(int sig);
|
||||
|
||||
static char buff[4096];
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue