Hi! - small code cleanup (generated code not changed).
--- Begin Message ---diff -ruNp old/kernel/dosfns.c new/kernel/dosfns.c --- old/kernel/dosfns.c 2004-07-20 17:57:38.000000000 +0000 +++ new/kernel/dosfns.c 2004-07-24 21:22:54.000000000 +0000 @@ -308,19 +308,14 @@ long DosRWSft(int sft_idx, size_t n, voi } } -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -/* !!! `mode' should be `unsigned' --avb */ -int SftSeek(int sft_idx, LONG new_pos, int mode) +int SftSeek(int sft_idx, LONG new_pos, unsigned mode) { sft FAR *s = idx_to_sft(sft_idx); if (FP_OFF(s) == (size_t) -1) return DE_INVLDHNDL; /* Test for invalid mode */ - if ((unsigned)mode > SEEK_END) /* 2 */ + if (mode > SEEK_END) /* 2 */ return DE_INVLDFUNC; lpCurSft = s; @@ -1025,8 +1020,7 @@ STATIC int pop_dmp(int rc, dmatch FAR * return rc; } -/* !!! `name' should be `const char FAR*' --avb */ -COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name) +COUNT DosFindFirst(UCOUNT attr, const char FAR * name) { dmatch FAR *save_dta = dta; int rc = truename(name, PriPathName, diff -ruNp old/kernel/proto.h new/kernel/proto.h --- old/kernel/proto.h 2004-07-24 22:04:32.000000000 +0000 +++ new/kernel/proto.h 2004-07-24 22:04:26.000000000 +0000 @@ -77,11 +77,16 @@ long cooked_write(struct dhdr FAR **pdev sft FAR *get_sft(UCOUNT); /* dosfns.c */ + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + const char FAR *get_root(const char FAR *); BOOL check_break(void); UCOUNT GenericReadSft(sft far * sftp, UCOUNT n, void FAR * bp, COUNT * err, BOOL force_binary); -COUNT SftSeek(int sft_idx, LONG new_pos, COUNT mode); +COUNT SftSeek(int sft_idx, LONG new_pos, unsigned mode); /*COUNT DosRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err); */ void BinarySftIO(int sft_idx, void *bp, int mode); #define BinaryIO(hndl, bp, mode) BinarySftIO(get_sft_idx(hndl), bp, mode) @@ -101,7 +106,7 @@ BOOL DosGetFree(UBYTE drive, UWORD * spc UWORD * bps, UWORD * nc); COUNT DosGetCuDir(UBYTE drive, BYTE FAR * s); COUNT DosChangeDir(BYTE FAR * s); -COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name); +COUNT DosFindFirst(UCOUNT attr, const char FAR * name); COUNT DosFindNext(void); COUNT DosGetFtime(COUNT hndl, date * dp, time * tp); COUNT DosSetFtimeSft(int sft_idx, date dp, time tp); @@ -374,7 +379,6 @@ void child_psp(seg_t para, seg_t cur_psp void return_user(void); COUNT DosExec(COUNT mode, exec_blk FAR * ep, BYTE FAR * lp); ULONG SftGetFsize(int sft_idx); -VOID InitPSP(VOID); #ifdef __WATCOMC__ # pragma aux return_user aborts #endif
--- End Message ---
