diff -urN edit.old/calendar.c edit/calendar.c --- edit.old/calendar.c 2004-01-23 05:12:54.000000000 -0800 +++ edit/calendar.c 2005-11-11 14:30:11.793377600 -0800 @@ -1,5 +1,8 @@ /* ------------- calendar.c ------------- */ #include "dflat.h" +#ifdef time +#undef time +#endif /* #ifndef TURBOC */ #ifndef NOCALENDAR diff -urN edit.old/console.c edit/console.c --- edit.old/console.c 2005-05-14 01:21:42.000000000 -0700 +++ edit/console.c 2005-11-11 15:45:25.633961600 -0800 @@ -128,7 +128,7 @@ int getshift(void) { static int enhkeyb = -1; /* 1 for an enhanced keyboard */ - static char far *kbtype = MK_FP(0x40,0x96); + char far *kbtype = MK_FP(0x40,0x96); /* new check method (10/2003) */ if (enhkeyb == -1) { /* if we do not yet know... */ enhkeyb = (((*kbtype) & 0x10) != 0) ? 1 : 0; /* read BIOS data flag! */ @@ -151,7 +151,7 @@ return regs.x.ax; } } - +#ifndef __WATCOMC__ static int far *clk = MK_FP(0x40,0x6c); /* ------- macro to wait one clock tick -------- */ #define wait() \ @@ -160,6 +160,15 @@ while (now == *clk) \ ; \ } +#else +#define wait waittick +void waittick(void) +{ + int far *clk = MK_FP(0x40,0x6c); + int now = *clk; + while(now==*clk) _toupper('a'); +} +#endif /* -------- sound a buzz tone, using hardware directly ---------- */ void beep(void) diff -urN edit.old/dflat.bdw edit/dflat.bdw --- edit.old/dflat.bdw 1969-12-31 16:00:00.000000000 -0800 +++ edit/dflat.bdw 2005-11-10 22:30:11.558307200 -0800 @@ -0,0 +1,43 @@ ++WINDOW.OBJ ++VIDEO.OBJ ++MESSAGE.OBJ ++MOUSE.OBJ ++CONSOLE.OBJ ++TEXTBOX.OBJ ++LISTBOX.OBJ ++NORMAL.OBJ ++CONFIG.OBJ ++MENU.OBJ ++MENUBAR.OBJ ++POPDOWN.OBJ ++RECT.OBJ ++APPLICAT.OBJ ++KEYS.OBJ ++SYSMENU.OBJ ++EDITBOX.OBJ ++DIALBOX.OBJ ++BUTTON.OBJ ++FILEOPEN.OBJ ++MSGBOX.OBJ ++HELPBOX.OBJ ++LOG.OBJ ++LISTS.OBJ ++STATBAR.OBJ ++DECOMP.OBJ ++COMBOBOX.OBJ ++PICTBOX.OBJ ++CLIPBORD.OBJ ++SEARCH.OBJ ++DFALLOC.OBJ ++CHECKBOX.OBJ ++TEXT.OBJ ++RADIO.OBJ ++BOX.OBJ ++SPINBUTT.OBJ ++WATCH.OBJ ++SLIDEBOX.OBJ ++DIRECT.OBJ ++EDITOR.OBJ ++CALENDAR.OBJ ++ASCIITAB.OBJ ++TCC2WAT.OBJ diff -urN edit.old/dflat.h edit/dflat.h --- edit.old/dflat.h 2005-07-22 07:52:46.000000000 -0700 +++ edit/dflat.h 2005-11-11 14:30:11.883507200 -0800 @@ -71,6 +71,7 @@ #include "commands.h" #include "dialbox.h" #include "helpbox.h" +#include "tcc2wat.h" /* ------ integer type for message parameters ----- */ typedef long PARAM; diff -urN edit.old/fixhelp.c edit/fixhelp.c --- edit.old/fixhelp.c 2003-10-15 01:01:22.000000000 -0700 +++ edit/fixhelp.c 2005-11-11 14:30:11.953608000 -0800 @@ -48,7 +48,7 @@ return thishelp ? hlp : -1; } -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { char *cp; int HelpCount = 0; diff -urN edit.old/makefile edit/makefile --- edit.old/makefile 2005-05-14 17:39:14.000000000 -0700 +++ edit/makefile 2005-11-13 10:26:37.555952000 -0800 @@ -41,7 +41,8 @@ #------------------------------------------------ #DEBUG = -v -Od #LINKDEBUG = /m /v -LINKDEBUG = /m +#LINKDEBUG = -M +LINKDEBUG = -fm #------------------------------------------------ # NOTE: Temporary file space. Change to match @@ -54,8 +55,11 @@ #------------------------------------------------ CC = tcc #CC = bcc -LINKER = tlink +#CC = wcc +LINKER = tcc +#LINKER = wcl LIB = tlib +#LIB = wlib #------------------------------------------------ # Set any extra options here @@ -70,14 +74,20 @@ # ### and still see all other error messages. # ### adding -K ("default char is unsigned"), as dflat has unsigned char! CCEXTRA = -K -w -w-stv +#CCEXTRA = -wx -wcd=300 # Calendar utility; you can disable (remove from menu) by defining NOCALENDAR #CCEXTRA = $(CCEXTRA) -DNOCALENDAR +LIST = dflat.bld +#LIST = dflat.bdw + #------------------------------------------------ # -c is "compile only" (do not link), -d "merge duplicate strings" COMPILE = $(CC) $(DEBUG) $(FULL) -c -d -m$(MODEL) $(CCEXTRA) -I$(DRIVE)\include -L$(DRIVE)\lib -LINK= $(LINKER) $(LINKDEBUG) $(DRIVE)\lib\c0$(MODEL) +#COMPILE = $(CC) $(DEBUG) $(FULL) -oas -d0 -m$(MODEL) $(CCEXTRA) LIBS= $(DRIVE)\lib\c$(MODEL) +LINK= $(LINKER) $(LINKDEBUG) -m$(MODEL) -e +#LINK= $(LINKER) $(LINKDEBUG) -m$(MODEL) -k8k -fe= #------------------------------------------------ # *** You should never have to modify this file below this line! *** @@ -87,7 +97,7 @@ # creates the main binary edit.exe : edit.obj dialogs.obj menus.obj dflat.lib - $(LINK) edit dialogs menus,edit.exe,edit,dflat $(LIBS) + $(LINK)edit.exe edit.obj dialogs.obj menus.obj dflat.lib # dflat.bld contents: For each of the listed .obj files, 1 line like # "+windows.obj &". Do not put an & after the last line. @@ -100,17 +110,17 @@ combobox.obj pictbox.obj clipbord.obj search.obj \ dfalloc.obj checkbox.obj text.obj radio.obj box.obj \ spinbutt.obj watch.obj slidebox.obj direct.obj \ - editor.obj calendar.obj asciitab.obj - del dflat.lib - $(LIB) dflat @dflat.bld + editor.obj calendar.obj asciitab.obj tcc2wat.obj + if exist dflat.lib del dflat.lib + $(LIB) dflat @$(LIST) # help file helper tool huffc.exe : huffc.obj htree.obj - $(LINK) huffc htree,$*.exe,$*,$(LIBS) + $(LINK)huffc.exe huffc.obj htree.obj # help file helper tool fixhelp.exe : fixhelp.obj decomp.obj - $(LINK) fixhelp decomp,$*.exe,$*,$(LIBS) + $(LINK)fixhelp.exe fixhelp.obj decomp.obj # runs huffc and fixhelp to compress and index the help file edit.hlp : edit.txt huffc.exe fixhelp.exe @@ -121,3 +131,11 @@ # the --best option compresses much slower but only very slighly better. upx : all upx --8086 --best edit.exe + +clean : edit.c + @del *.obj + @del *.map + @del *.bak + @del *.err + @del huffc.exe + @del fixhelp.exe diff -urN edit.old/menubar.c edit/menubar.c --- edit.old/menubar.c 2005-05-14 03:53:34.000000000 -0700 +++ edit/menubar.c 2005-11-11 14:30:12.043737600 -0800 @@ -208,9 +208,11 @@ else SendMessage(wnd, PAINT, 0, 0); break; +#ifndef __WATCOMC__ #ifndef HOOKKEYB: case LARROW: /* hope that makes sense */ #endif +#endif case BS: if (ActiveMenuBar->ActiveSelection == 0 || ActiveMenuBar->ActiveSelection == -1) diff -urN edit.old/message.c edit/message.c --- edit.old/message.c 2005-05-17 16:26:06.000000000 -0700 +++ edit/message.c 2005-11-11 15:59:57.077035200 -0800 @@ -1,6 +1,9 @@ /* --------- message.c ---------- */ #include "dflat.h" +#ifdef time +#undef time +#endif #define BLINKING_CLOCK 0 /* set to 1 to make the clock blink */ /* blinking is off by default since 0.7c */ @@ -74,7 +77,11 @@ /* 1 counting */ static long unsigned int timerend[3] = {0, 0, 0}; static long unsigned int timerstart[3] = {0, 0, 0}; -volatile long unsigned int *biostimer = MK_FP(0x40,0x6c); +/*#ifndef __WATCOMC__*/ +volatile long unsigned int *biostimer = (long unsigned int *)MK_FP(0x40,0x6c); +/*#else +volatile long unsigned int *biostimer; +#endif*/ /* just using BIOS DATA "timer tick count" */ #endif @@ -110,6 +117,9 @@ int timed_out(int timer) /* was: countdown 0? */ { +#ifdef __WATCOMC__ + biostimer = (unsigned long volatile *)MK_FP(0x40,0x6c); +#endif if ((timer > 2) || (timer < 0)) return -1; /* invalid -> always elapsed */ if (timerused[timer] == 0) /* not active at all? */ @@ -155,6 +165,9 @@ void set_timer(int timer, int secs) { +#ifdef __WATCOMC__ + biostimer = (unsigned long volatile *)MK_FP(0x40,0x6c); +#endif if ((timer > 2) || (timer < 0)) return; timerstart[timer] = biostimer[0]; @@ -164,6 +177,9 @@ void set_timer_ticks(int timer, int ticks) { +#ifdef __WATCOMC__ + biostimer = (unsigned long volatile *)MK_FP(0x40,0x6c); +#endif if ((timer > 2) || (timer < 0)) return; timerstart[timer] = biostimer[0]; @@ -218,12 +234,20 @@ #else +#ifdef __WATCOMC__ +int crit_error(unsigned a, unsigned b, unsigned far *c); +#else int crit_error(void); +#endif /* ----- critical error handler ----- */ /* HINT: Whoever tests CriticalError should display errors as */ /* (errno < sys_nerr) ? sys_errlist[errno] : "Unknown error" */ +#ifdef __WATCOMC__ +int crit_error(unsigned a, unsigned b, unsigned far *c) +#else int crit_error(void) +#endif { CriticalError = TRUE; hardretn(-1); /* return an error! */ @@ -336,7 +360,14 @@ #ifdef OLDCRITERR /* old style: hook intr 0x24 manually */ setvect(CRIT, newcrit); /* (vector save/restore not needed here) */ #else +#ifdef __WATCOMC__ + harderr((int (__far *)(unsigned int __p1, + unsigned int __p2, + unsigned int __far *__p3)) + crit_error); +#else harderr(crit_error); /* set critical error handler (dos.h) */ +#endif /* handler uses hardretn / hardresume */ #endif diff -urN edit.old/mouse.c edit/mouse.c --- edit.old/mouse.c 1992-06-10 15:56:16.000000000 -0700 +++ edit/mouse.c 2005-11-11 15:53:49.578598400 -0800 @@ -24,8 +24,7 @@ /* ----- test to see if the mouse driver is installed ----- */ BOOL mouse_installed(void) { - unsigned char far *ms; - ms = MK_FP(peek(0, MOUSE*4+2), peek(0, MOUSE*4)); + unsigned char far *ms = MK_FP(peek(0, MOUSE*4+2), peek(0, MOUSE*4)); return (SCREENWIDTH <= 80 && ms != NULL && *ms != 0xcf); } diff -urN edit.old/tcc2wat.c edit/tcc2wat.c --- edit.old/tcc2wat.c 1969-12-31 16:00:00.000000000 -0800 +++ edit/tcc2wat.c 2005-11-11 14:09:02.007515200 -0800 @@ -0,0 +1,112 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Currently missing functions are: + * bcd bcd(int x); or bcd(double x, int decimals); + * int bdosptr(int dosfun, void arg, unsigned dosal); + * double conj(complex z); + * struct country *country(int countrycode, country countryp); + * void geninterrupt(int intr_num); + * int gsignal(sig); + * int movetext(int left, int top, int right, int bottom, int newleft, int newtop); + * double norm(complex z); + * complex polar(double magnit, double angle); + * double poly(double x, int num, double cf[]); + * int (*ssignal(int sig, int *action))(); + * Most graphics functions are missing; right now I'm focusing on text and regular functions + */ +#ifdef __WATCOMC__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tcc2wat.h" +#undef _matherr + +void ctrlbrk(int (*fptr)(void)) +{ + _dos_setvect(0x23, (void (__interrupt __far *))fptr); +} + +int getcbrk(void) +{ + union REGS regs; + + regs.h.ah = 0x33; + intdos(®s, ®s); + return (int)regs.h.dl; +} + +int fnsplit(const char *path, char *drive, char *dir, char *name, char *ext) +{ + int a = 0; + char rname[_MAX_FNAME]; + _splitpath(path, drive, dir, rname, ext); + if (strchr(path, '.') != NULL) a+=EXTENSION; + if (strlen(rname) > 0) a+=FILENAME; + if (strchr(path, '\\') != NULL) a+=DIRECTORY; + if (strchr(path, ':') != NULL) a+=DRIVE; + if (strchr(path, '*') != NULL || strchr(path, '?') != NULL) a+=WILDCARDS; + strcpy(name, rname); + return a; +} + +int setcbrk(int value) +{ + if(value == 1) {break_on();return 1;} + if(value == 0) break_off(); + return 0; +} + +int getdisk(void) +{ + unsigned drive; + _dos_getdrive(&drive); + return drive-1; +} + +int setdisk(int drive) +{ + unsigned a; + _dos_setdrive(drive-1, &a); + return a; +} + +struct country *country(int xcode, struct country *cp) +{ + union REGS regs; + struct SREGS sregs; + regs.h.ah = 0x38; + if(xcode<255) regs.h.al = xcode; + else {regs.h.al = 255;regs.x.bx = xcode;} + sregs.ds = FP_SEG(cp); + regs.x.dx = FP_OFF(cp); + intdosx(®s, ®s, &sregs); + if(regs.x.cflag) return NULL; + return cp; +} + +#endif \ No newline at end of file diff -urN edit.old/tcc2wat.h edit/tcc2wat.h --- edit.old/tcc2wat.h 1969-12-31 16:00:00.000000000 -0800 +++ edit/tcc2wat.h 2005-11-11 14:03:50.769977600 -0800 @@ -0,0 +1,344 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __TCC2WAT +#define __TCC2WAT 1 +#ifdef __WATCOMC__ +#include +#include +#include + +struct ftime /* As defined by Borland C */ +{ + unsigned ft_tsec : 5; /* Two second interval */ + unsigned ft_min : 6; /* Minutes */ + unsigned ft_hour : 5; /* Hours */ + unsigned ft_day : 5; /* Days */ + unsigned ft_month : 4; /* Months */ + unsigned ft_year : 7; /* Year */ +}; + +struct fatinfo +{ + char fi_sclus; /* Sectors per cluster */ + char fi_fatid; /* The FAT id byte */ + int fi_nclus; /* Number of clusters */ + int fi_bysec; /* Bytes per sector */ +}; + +struct fcb +{ + char fcb_drive; /* 0 = default, 1 = A, 2 = B */ + char fcb_name[8]; /* File name */ + char fcb_ext[3]; /* File extension */ + short fcb_curblk; /* Current block number */ + short fcb_recsize; /* Logical record size in bytes */ + long fcb_filsize; /* File size in bytes */ + short fcb_date; /* Date file was last written */ + char fcb_resv[10]; /* Reserved for DOS */ + char fcb_currec; /* Current record in block */ + long fcb_random; /* Random record number */ +}; + +struct text_info +{ + unsigned char winleft; /* left window coordinate */ + unsigned char wintop; /* top window coordinate */ + unsigned char winright; /* right window coordinate */ + unsigned char winbottom; /* bottom window coordinate */ + unsigned char attribute; /* text attribute */ + unsigned char normattr; /* normal attribute */ + unsigned char currmode; /* video mode */ + unsigned char screenheight; /* bottom - top */ + unsigned char screenwidth; /* right - left */ + unsigned char curx; /* x coordinate in window */ + unsigned char cury; /* y coordinate in window */ +}; + +struct country +{ + int co_date; /* date format */ + char co_curr[5]; /* currency symbol */ + char co_thsep[2]; /* thousands separator */ + char co_desep[2]; /* decimal separator */ + char co_dtsep[2]; /* date separator */ + char co_tmsep[2]; /* time separator */ + char co_currstyle; /* currency style */ + char co_digits; /* significant digits in currency */ + char co_time; /* time format */ + long co_case; /* case map */ + char co_dasep[2]; /* data separator */ + char co_fill[10]; /* filler */ +}; + +#define _argv __argv +#define _argc __argc + +#define farmalloc _fmalloc +#define farfree _ffree +#define allocmem(x,y) _dos_allocmem(x,(unsigned short *)y) +#define freemem _dos_freemem +#define harderr _harderr +#define hardresume _hardresume +#define hardretn _hardretn + +#define DOS_GETFTIME _dos_getftime +#define DOS_SETFTIME _dos_setftime +#define FAR _far + +#define MAXPATH _MAX_PATH +#define MAXFILE _MAX_FNAME +#define MAXEXT _MAX_EXT +#define MAXDRIVE _MAX_DRIVE +#define MAXDIR _MAX_DIR + +#define FA_RDONLY _A_RDONLY +#define FA_ARCH _A_ARCH +#define FA_SYSTEM _A_SYSTEM +#define FA_HIDDEN _A_HIDDEN +#define FA_DIREC _A_SUBDIR +#define FA_LABEL _A_VOLID +#define mktemp _mktemp + +#define findfirst(x,y,z) _dos_findfirst(x,z,y) +#define findnext _dos_findnext +#define ffblk find_t +#define ff_name name +#define ff_attrib attrib +#define ff_reserved reserved +#define ff_ftime wr_time +#define ff_date wr_date +#define ff_fsize size + +#define getdfree _dos_getdiskfree +#define dfree _diskfree_t +#define df_total total_clusters +#define df_avail avail_clusters +#define df_sclus sectors_per_cluster +#define df_bsec bytes_per_sector + +#define fnmerge(a,b,c,d,e) _makepath(a,b,c,d,e) +#define SKIPSEP 0x1 +#define NODRIVE 0x2 +#define NOFNAME 0x4 +#define NOEXT 0x8 +#define WILDCARDS 0x01 +#define EXTENSION 0x02 +#define FILENAME 0x04 +#define DIRECTORY 0x08 +#define DRIVE 0x10 + +#define date dosdate_t +#define da_year year +#define da_mon month +#define da_day day +#define ti_hour hour +#define ti_min minute +#define ti_sec second +#define ti_hund hsecond +#define time dostime_t +#define getdate _dos_getdate +#define gettime _dos_gettime +#define setdate _dos_setdate +#define settime _dos_settime + +#define bioscom(x,y,z) _bios_serialcom(x,z,y) +#define biosequip _bios_equiplist +#define bioskey _bios_keybrd +#define biosprint(x,y,z) _bios_printer(x,z,y) + +#define inport inpw +#define inportb inp +#define outport outpw +#define outportb outp +#define enable _enable +#define disable _disable +#define poke(a,b,c) (*((int far*)MK_FP((a),(b))) = (int)(c)) +#define pokeb(a,b,c) (*((char far*)MK_FP((a),(b))) = (char)(c)) +#define peek(a,b) (*((int far*)MK_FP((a),(b)))) +#define peekb(a,b) (*((char far*)MK_FP((a),(b)))) + +#define r_ax w.ax +#define r_bx w.bx +#define r_cx w.cx +#define r_dx w.dx +#define r_bp w.bp +#define r_si w.si +#define r_di w.di +#define r_ds w.ds +#define r_es w.es +#define r_flags w.flags +#define flags cflag + +#define setverify(value) bdos(0x2e,0,(value)) +#define getverify() bdos(0x54,0,0)&0xff +#define getvect _dos_getvect +#define setvect _dos_setvect +#define keep _dos_keep + +#define _mexcep int +#define pow10(x) pow(10,(double)x) +#define _matherr __matherr +typedef struct _complex complex; +#define complex(x,y) __complex(x,y) +#define imag(a) (a.y) +#define real(a) (a.x) +#define arg(a) (hypot(a.x, a.y)) +#define randomize() srand( ((unsigned int)time(NULL)) | 1) + +#define strncmpi strnicmp + +#define BLACK 0 +#define BLUE 1 +#define GREEN 2 +#define CYAN 3 +#define RED 4 +#define MAGENTA 5 +#define BROWN 6 +#define LIGHTGRAY 7 +#define DARKGRAY 8 +#define LIGHTBLUE 9 +#define LIGHTGREEN 10 +#define LIGHTCYAN 11 +#define LIGHTRED 12 +#define LIGHTMAGENTA 13 +#define YELLOW 14 +#define WHITE 15 +#define BLINK 16 + +#if !defined(COLORMODE) +#define COLORMODE ((*(char FAR *)0x0449) != 7) +#define EXT_KBD (*(char FAR *)0x0496 & 16) +#define VIDPAGE (*((unsigned char far *)0x0462)) +#define ROWSIZE (*(int FAR *)0x044A) +#define SCANLINES ((int)*(char FAR*)0x0461) +#define SCRBUFF ((unsigned FAR *)((COLORMODE)?0xB8000000:0xB0000000)) +#define SCREENSEG ((unsigned)((COLORMODE)?0xB800:0xB000)) +#define SCREENSIZE ((*(int FAR *)0x044C) >> 1) +#define SCREENCOLS (*(int FAR *)0x044A) +#define SCREENROWS ((*(char FAR *)0x0484)?1+(*(char FAR *)0x0484):25) +#endif +#define SCROLL_UP 0 +#define SCROLL_DN 1 + +#define LASTMODE _DEFAULTMODE +#define BW40 _TEXTBW40 +#define C40 _TEXTC40 +#define BW80 _TEXTBW80 +#define C80 _TEXTC80 +#define MONO _TEXTMONO +#define textmode _setvideomode +#define window(a,b,c,d) _settextwindow(b,a,d,c) +#define clrscr() _clearscreen(_GWINDOW) +#define cleardevice() _clearscreen(_GCLEARSCREEN) +#define clearviewport() _clearscreen(_GVIEWPORT) +#define closegraph() _setvideomode(_DEFAULTMODE) +#define rectangle(a,b,c,d) _rectangle(_GFILLINTERIOR, (short)a, (short)b, (short)c, (short)d) + +#define _NOCURSOR 0x2000 +#define _SOLIDCURSOR 0x0007 +#define _NORMALCURSOR 0x0607 +#define _setcursortype _settextcursor + +#define toascii(c) ((c)&0177) + +struct _complex complex(double real, double imag); +int random(int num); +int stime(time_t *tp); +int _chmod(const char *filename, int func, ...); +int getftime (int handle, struct ftime *ftimep); +int setftime (int handle, struct ftime *ftimep); +char *searchpath(const char *filename); +int biosdisk(int cmd, int drive, int head, int track, int sector, int nsects, void *buffer); +long *biostime(int cmd, long *newtime); +void ctrlbrk(int (*fptr)(void)); +int getcbrk(void); +int getcurdir(int drive, char *direc); +int fnsplit(const char *path, char *drive, char *dir, char *name, char *ext); +char far *getdta(); +void setdta(char far *dta); +void getfat(unsigned char drive, struct fatinfo *fatblkp); +void getfatd(struct fatinfo *fatblkp); +unsigned getpsp(void); +int ioctl(int handle, int cmd, ...); +char *getpass(const char *prompt); +double _matherr(_mexcep why, char *fun, double arg1p, double arg2p, double retval); +int _read(int handle, void *buf, unsigned nbyte); +char *parsfnm(const char *cmdline, struct fcb *fcbptr, int option); +int setcbrk(int value); +int getdisk(void); +int setdisk(int drive); +char *stpcpy (char *dest, const char *src); +void textbackground(int color); +void textcolor(int color); +void textattr(int attr); +void highvideo (void); +void lowvideo (void); +void normvideo (void); +int _write(int handle, void *buf, int nbyte); +int _creat(const char *filename, int attrib); +int creatnew(const char *filename, int attrib); +int creattemp(char *filename, int attrib); +void gettextinfo(struct text_info inforec); +int randbrd(struct fcb *fcbptr, int reccnt); +int randbwr(struct fcb *fcbptr, int reccnt); +int wherex(void); +int wherey(void); +void gotoxy(int col, int row); +void clreol(void); +struct country *country(int xcode, struct country *cp); +unsigned long dostounix (struct date *d, struct time *t); +void unixtodos (unsigned long time, struct date *d, struct time *t); + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +int absread(int DosDrive, int nsects, int foo, void *diskReadPacket); +#pragma aux absread = \ + "push bp" \ + "int 0x25" \ + "sbb ax, ax" \ + "popf" \ + "pop bp" \ + parm [ax] [cx] [dx] [bx] \ + modify [si di] \ + value [ax]; +int abswrite(int DosDrive, int nsects, int foo, void *diskReadPacket); +#pragma aux abswrite = \ + "push bp" \ + "int 0x26" \ + "sbb ax, ax" \ + "popf" \ + "pop bp" \ + parm [ax] [cx] [dx] [bx] \ + modify [si di] \ + value [ax]; + +#endif /*__WATCOMC__*/ +#endif /*__TCC2WAT*/ diff -urN edit.old/video.c edit/video.c --- edit.old/video.c 2005-05-14 17:44:48.000000000 -0700 +++ edit/video.c 2005-11-11 14:30:12.143881600 -0800 @@ -19,7 +19,7 @@ unsigned vadr = vad(RectLeft(rc), RectTop(rc)); hide_mousecursor(); while (ht--) { - movefromscreen(bf, vadr, bytes_row); + movefromscreen((void *)bf, vadr, bytes_row); vadr += SCREENWIDTH*2; bf = (char far *)bf + bytes_row; } @@ -34,7 +34,7 @@ unsigned vadr = vad(RectLeft(rc), RectTop(rc)); hide_mousecursor(); while (ht--) { - movetoscreen(bf, vadr, bytes_row); + movetoscreen((void *)bf, vadr, bytes_row); vadr += SCREENWIDTH*2; bf = (char far *)bf + bytes_row; }