From 26fcad46165c875159dd46806bf8b8b6c0e858dd Mon Sep 17 00:00:00 2001 From: Tony Nicholson Date: Sun, 8 Mar 2020 15:38:40 +1100 Subject: [PATCH] Add some missing strXXX() functions --- README.md | 107 +++++++++++++- dist/LIBC##.LIB | Bin 0 -> 73600 bytes dist/LIBC.LIB | Bin 73600 -> 80896 bytes dist/STRING##.H | 39 ++++++ dist/STRING.H | 22 ++- dist/TIME#.H | 27 ++++ dist/TIME.H | 10 ++ gen/MODULES4.PRN | 285 +++++++++++++++++++++++++++++++++++++ gen/PATCH4.SUB | 14 ++ gen/STRCHR#.AS | 19 +++ gen/STRCHR.AS | Bin 174 -> 383 bytes gen/STRDUP.C | 11 ++ gen/STRFTIME.C | 343 +++++++++++++++++++++++++++++++++++++++++++++ gen/STRICMP.AS | 47 +++++++ gen/STRISTR.C | 34 +++++ gen/STRNICMP.AS | 54 +++++++ gen/STRNISTR.C | 38 +++++ gen/STRNSTR.C | 35 +++++ gen/STRRCHR#.AS | 28 ++++ gen/STRRCHR.AS | 33 +++-- gen/STRSTR.C | 32 +++++ gen/STRTOK.C | 39 ++++++ stdio/COMPLIB#.SUB | 164 ++++++++++++++++++++++ stdio/COMPLIBC.SUB | 11 +- stdio/LISTMOD#.SUB | 1 + stdio/LISTMODC.SUB | 2 +- stdio/MAKELIB#.SUB | 153 ++++++++++++++++++++ stdio/MAKELIBC.SUB | 15 +- test/TESTFTIM.C | 19 +++ 29 files changed, 1554 insertions(+), 28 deletions(-) create mode 100644 dist/LIBC##.LIB create mode 100644 dist/STRING##.H create mode 100644 dist/TIME#.H create mode 100644 gen/MODULES4.PRN create mode 100644 gen/PATCH4.SUB create mode 100644 gen/STRCHR#.AS create mode 100644 gen/STRDUP.C create mode 100644 gen/STRFTIME.C create mode 100644 gen/STRICMP.AS create mode 100644 gen/STRISTR.C create mode 100644 gen/STRNICMP.AS create mode 100644 gen/STRNISTR.C create mode 100644 gen/STRNSTR.C create mode 100644 gen/STRRCHR#.AS create mode 100644 gen/STRSTR.C create mode 100644 gen/STRTOK.C create mode 100644 stdio/COMPLIB#.SUB create mode 100644 stdio/LISTMOD#.SUB create mode 100644 stdio/MAKELIB#.SUB create mode 100644 test/TESTFTIM.C diff --git a/README.md b/README.md index b951eec..0dfab92 100644 --- a/README.md +++ b/README.md @@ -368,7 +368,7 @@ Extended getenv() Release v3.09-3b ---------------- +---------------- Updated the previous release to adjust the ordering of modules in LIBC.LIB - programs should now link correctly. Also added the missing documentation for @@ -376,3 +376,108 @@ the debugger in doc/DEBUGMAN.TXT (this was previously available from the now defunct hitech.com.au web site) and scanned PDFs of the 1989 vintage documentation. + +Release v3.09-4 +--------------- + +Some of the string related function prototypes in STRING.H are missing from +the LIBC.LIB library. Most of these are from an update to the MSX flavour +of HI-TECH C by Arnold Metsalaar. I've cherry-picked the following routines +which are applicable to generic CP/M as well as MSX. + +``` +STRING.H + The header file has been changed to reflect the available + functions in LIBC.LIB. There are still missing routines - + namely strcoll() strcspn() strpbrk() and strspn() and these + have been commented out for now. + +strchr() and strrchr() + char *strchr(char *s, int c) + char *strrchr(char *s, int c) + These functions - as well as index() and rindex() (which are identical) + previously returned a NULL for no match. The functions now return + a pointer to the character string's ending NUL character. + +stricmp() and strnicmp() + char stricmp(char *s1, char *s2) + char strnicmp(char *s1, char *s2, size_t n) + Case-insensitive versions of strcmp() and strncmp() comparison routines. + Can also be referenced as strcasecmp() and strncasecmp(). + +strstr(), strnstr(), stristr() and strnistr() + char *strstr(char *t, char *s) + char *strnstr(char *t, char *s, unsigned int n) + char *strcasestr(char *t, char *s) + char *strncasestr(char *t, char *s, unsigned int n) + These extra functions locate the first occurrence of string s in + string t. The functions strnstr() and strcasestr() read at most + n characters from the string t. The functions strcasestr() and + casencasestr() use case insensitive comparisons. + All these functions return a pointer to the first character of + the first occurence ofstring s in string t if found, and NULL + otherwise. + +strdup() + char *strdup(char *s) + Allocates a new buffer for and copies the string pointed to + by s to it. Returns a pointer to the copy of the string or NULL + if the memory allocation failed. The memory block can be released + using free(). + +strtok() + char *strtok(char *s, char *tok, size_t toklen, char *brk) + Copies charactersfrom s to tok until it encounters one of the + characters in brk or until toklen-1 characters have been copied + (whichever comes first). It then adds a NUL character to the + end of the string. This is a non-conforming POSIX function. + +TIME.H + Now includes a prototype for strftime() - see below. + +strftime() + size_t strftime(char *s, size_t maxs, char *f, struct tm *t) + Converts a time value t to a string using the format string f + into the string s of size maxs (including a terminating NUL). + It acts as a sprintf() function for date/time values. The + following are valid in the format string - + + %A full weekday name (Monday) + %a abbreviated weekday name (Mon) + %B full month name (January) + %b abbreviated month name (Jan) + %c standard date and time representation + %d day-of-month (01-31) + %H hour (24 hour clock) (00-23) + %I hour (12 hour clock) (01-12) + %j day-of-year (001-366) + %M minute (00-59) + %m month (01-12) + %p local equivalent of AM or PM + %S second (00-59) + %U week-of-year, first day sunday (00-53) + %W week-of-year, first day monday (00-53) + %w weekday (0-6, sunday is 0) + %X standard time representation + %x standard date representation + %Y year with century + %y year without century (00-99) + %Z timezone name + %% percent sign + + the standard date string is equivalent to: + + %a %b %d %Y + + the standard time string is equivalent to: + + %H:%M:%S + + the standard date and time string is equivalent to: + + %a %b %d %H:%M:%S %Y + + strftime() returns the number of characters placed in the + buffer, not including the terminating NUL, or zero if more + than maxs characters were produced. +``` diff --git a/dist/LIBC##.LIB b/dist/LIBC##.LIB new file mode 100644 index 0000000000000000000000000000000000000000..48c794576bd3690c14abf042b352296b6d7eda1c GIT binary patch literal 73600 zcmdqK3w)eanLmCeNz*jFrrai6XBsHemO`4#G%W}eN)hY@+EP%UF-?;;GM$8(gtU}~ z;ssV+TwUE2FS{zbig;bQWWBAXwO|{oR4oens{PeerB($6+R{n>-{*4P_q;Qiwz$9j zeEy%`K=Z!me$I2A^W4sJ&U@YkA2R2dQu96|zif9)rhCrCoon7^OmlNfW?gHuDQ|9G z*M|6YSz|c8r^|fbRGYh}N*PV$LdYwHP}&wkTu0{`RI_GnXO znT~XKJH2JvI=kA^ctcUjiAPVzTD){*Te`b9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?ytCe$eX&#v$WT#-HpVMp{qWf zSSShOq3Lx;sWH}0>8oldEW;afLPujIx(VaPKpe=1vDR+~+r?B$yTXPc3!rzlgGg#0Fz0K70@sh%iIt^cZVKjGpt3$qG=^ z)cD1L&K4*|FCv5?Jr^K`A3OZUnz+$((J?2xiJ`$W2ibQ|E5Iye3?C~i!-0;rs#+QI zR9y}Q8`QxiX*_ZPhvt0IkxlEMeWzo3*1>g%;sJqLYUutlH+lNcO~NcO`W3_dEH00H zyn=09^EL<02y0+i$a~gJLNpWbw1|ts0S)E{1F$&kg{9sOSiC9>vwFK=QEP}AJ6ijx znFvbs5k;whDxqwztU?89L7i|f73Q`EV3xNH=C}4jLr*VKtP2P5-wzGpPFUpafd%a$ zxFxt2W@_GcQV6&9_LEYtETCrlD$?!pC$zn!-cS1BJ{+63C*!Kl7D?}J+_m+oyiRb@>?JD^qBG;zLQwzf=!|vSVsRPpur^!`*=pD%@BJ)W15;D9q~(fQC^DIH8fyGN(`xniulRVuV|&!D>7Gf z2Lqv1vO-ODMO)Yh;t^xb8ms@I zH!qt~HhuUmz|XOdo+{M7ly!3Ueor}MC9$E4CmyQt<5pZ#Gg}FB%xo3xG_%!k$jsKj zNi$oUxVUNfe*1f2D@g+B$JMMcv-L2~#NzthWoA8~nb`_>*vwYK2{T&_jmb6gl(7S{8j}MjGPAWB+yMcEvyvR~1p$z=gd)BHlXxbJvo$9e zECD&QPE)ra5HmIa5&!@I003fha{xv(F|!qPSUv$clWwvclVPV5vz@ZAIhQLs0iLr> z?A!;FUHA->vhz5X&KCg>vuE_DBbR>{0Z)^^=nj{F9RUQlRTu$Y1-E)Q0kHv>zas$* Ox79iUD*=~~I{{AR0y$Cu diff --git a/dist/STRING##.H b/dist/STRING##.H new file mode 100644 index 0000000..9bff702 --- /dev/null +++ b/dist/STRING##.H @@ -0,0 +1,39 @@ +/* String functions */ + +#ifndef _STDDEF +typedef int ptrdiff_t; /* result type of pointer difference */ +typedef unsigned size_t; /* type yielded by sizeof */ +#define _STDDEF +#define offsetof(ty, mem) ((int)&(((ty *)0)->mem)) +#endif _STDDEF + +#ifndef NULL +#define NULL ((void *)0) +#endif NULL + +extern int errno; /* system error number */ + +extern void *memcpy(void *, void *, size_t); +extern void *memmove(void *, void *, size_t); +extern char *strcpy(char *, char *); +extern char *strncpy(char *, char *, size_t); +extern char *strcat(char *, char *); +extern char *strncat(char *, char *, size_t); +extern int memcmp(void *, void *, size_t); +extern int strcmp(char *, char *); +extern int strcasecmp(char *, char *); +extern int strncmp(char *, char *, size_t); +extern int strnicmp(char *, char *, size_t); +#define strncasecmp strnicmp +extern size_t strcoll(char *, size_t, char *); +extern void *memchr(void *, int, size_t); +extern size_t strcspn(char *, char *); +extern char *strpbrk(char *, char *); +extern size_t strspn(char *, char *); +extern char *strstr(char *, char *); +extern char *strtok(char *, char *); +extern void *memset(void *, int, size_t); +extern char *strerror(int); +extern size_t strlen(char *); +extern char *strchr(char *, int); +extern char *strrchr(char *, int); diff --git a/dist/STRING.H b/dist/STRING.H index 9bff702..543ad10 100644 --- a/dist/STRING.H +++ b/dist/STRING.H @@ -1,4 +1,4 @@ -/* String functions */ +/* String functions v3.09-4 */ #ifndef _STDDEF typedef int ptrdiff_t; /* result type of pointer difference */ @@ -23,17 +23,25 @@ extern int memcmp(void *, void *, size_t); extern int strcmp(char *, char *); extern int strcasecmp(char *, char *); extern int strncmp(char *, char *, size_t); -extern int strnicmp(char *, char *, size_t); -#define strncasecmp strnicmp -extern size_t strcoll(char *, size_t, char *); +extern int strncasecmp(char *, char *, size_t); +#define strnicmp strncasecmp +/* extern size_t strcoll(char *, size_t, char *); */ /* missing */ extern void *memchr(void *, int, size_t); -extern size_t strcspn(char *, char *); -extern char *strpbrk(char *, char *); -extern size_t strspn(char *, char *); +/* extern size_t strcspn(char *, char *); */ /* missing */ +/* extern char *strpbrk(char *, char *); */ /* missing */ +/* extern size_t strspn(char *, char *); *//* missing */ extern char *strstr(char *, char *); extern char *strtok(char *, char *); extern void *memset(void *, int, size_t); extern char *strerror(int); extern size_t strlen(char *); extern char *strchr(char *, int); +/* #define index strchr */ /* these are equivalent */ +extern char *index(char *, int); extern char *strrchr(char *, int); +/* #define rindex *strrchr */ /* these are equivalent */ +extern char *rindex(char *, int); +extern char *strcasestr(char *, char *); +#define stristr strcasestr +extern char *strncasestr(char *, char *, size_t); +#define strnistr strncasestr diff --git a/dist/TIME#.H b/dist/TIME#.H new file mode 100644 index 0000000..adb0f1f --- /dev/null +++ b/dist/TIME#.H @@ -0,0 +1,27 @@ +#ifndef _TIME + +typedef long time_t; /* for representing times in seconds */ +struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; +}; +#define _TIME +#endif _TIME + +extern int time_zone; /* minutes WESTWARD of Greenwich */ + /* this value defaults to 0 since with + operating systems like MS-DOS there is + no time zone information available */ + +extern time_t time(time_t *); /* seconds since 00:00:00 Jan 1 1970 */ +extern char * asctime(struct tm *); /* converts struct tm to ascii time */ +extern char * ctime(); /* current local time in ascii form */ +extern struct tm * gmtime(); /* Universal time */ +extern struct tm * localtime(); /* local time */ diff --git a/dist/TIME.H b/dist/TIME.H index adb0f1f..32aff5f 100644 --- a/dist/TIME.H +++ b/dist/TIME.H @@ -1,3 +1,5 @@ +/* time.h for HI-TECH C Z80 v3.09-4*/ + #ifndef _TIME typedef long time_t; /* for representing times in seconds */ @@ -15,6 +17,13 @@ struct tm { #define _TIME #endif _TIME +#ifndef _STDDEF +typedef int ptrdiff_t; /* result type of pointer difference */ +typedef unsigned size_t; /* type yielded by sizeof */ +#define _STDDEF +#define offsetof(ty, mem) ((int)&(((ty *)0)->mem)) +#endif + extern int time_zone; /* minutes WESTWARD of Greenwich */ /* this value defaults to 0 since with operating systems like MS-DOS there is @@ -25,3 +34,4 @@ extern char * asctime(struct tm *); /* converts struct tm to ascii time */ extern char * ctime(); /* current local time in ascii form */ extern struct tm * gmtime(); /* Universal time */ extern struct tm * localtime(); /* local time */ +extern size_t strftime(char *s, size_t maxs, char *f, struct tm *t); diff --git a/gen/MODULES4.PRN b/gen/MODULES4.PRN new file mode 100644 index 0000000..451bbbd --- /dev/null +++ b/gen/MODULES4.PRN @@ -0,0 +1,285 @@ +start1.obj D __argc_ U __getargs D startup +getargs.obj U __argc_ D __getargs U __iob U _bdos + U _bmove U _exit U _fprintf U _freopen + U _gets U _getuid U _isatty U _sbrk + U _setfcb U _setuid U _sprintf U _strchr + U _strcpy U _strlen U adiv U cret + U csv U indir U ncsv U shal + U wrelop +assert.obj D __fassert U __iob U _abort U _fprintf + U cret U csv U indir U ncsv +printf.obj U __doprnt U __iob D _printf U cret + U csv U indir U ncsv +fprintf.obj U __doprnt D _fprintf U cret U csv + U indir U ncsv +sprintf.obj U __doprnt D _sprintf U cret U csv + U indir U ncsv +doprnt.obj U __ctype_ D __doprnt U __pnum U _atoi + U _fputc U _strlen U brelop U cret + U csv U indir U ncsv +gets.obj U __iob U _fgetc D _fgets D _gets + U _strlen U cret U csv U indir + U ncsv +puts.obj U __iob U _fputc D _fputs D _puts + U cret U csv U indir U ncsv +fwrite.obj U _fputc D _fwrite U cret U csv + U indir U ldiv U lmul U ncsv +getw.obj U _fgetc D _getw U cret U csv + U indir U ncsv U shal +putw.obj U _fputc D _putw U cret U csv + U indir U ncsv U shar +getenv.obj U _bdos D _environ U _fclose U _fgets + U _fopen D _getenv U _memcpy U _sbrk + U _strcpy U _strlen U _strncmp U cret + U csv U indir U ncsv U wrelop +putchar.obj U __iob U _fgetc U _fputc D _getchar + D _putchar U cret U csv U indir + U ncsv +perror.obj U __iob U _errno U _fputc D _perror + U _sys_err U _sys_ner U cret U csv + U indir U ncsv U wrelop +fputc.obj U __flsbuf D _fputc +flsbuf.obj D __flsbuf U _write U cret U csv + U indir U ncsv +fopen.obj U __iob D _fopen U _freopen U cret + U csv U indir U ncsv +freopen.obj U __bufallo U _close U _creat U _errno + U _fclose D _freopen U _fseek U _open + U cret U csv U indir U ncsv +fseek.obj U __fcb U _fflush U _fread D _fseek + D _ftell U _lseek U alsub U amul + U arelop U asaladd U cret U csv + U indir U ncsv +fread.obj U _fgetc D _fread U cret U indir + U ldiv U lmul U ncsv +rewind.obj U _fseek D _rewind U cret U csv + U indir U ncsv +remove.obj D _remove U _unlink U cret U csv + U indir U ncsv +setbuf.obj U __buffree D _setbuf U cret U csv + U indir U ncsv +fscanf.obj U __doscan D _fscanf U cret U csv + U indir U ncsv +ctime.obj D _asctime D _ctime D _gmtime D _localtime + D _monlen U _time_zone U adiv U aldiv + U almod U alsub U amod U amul + U asaldiv U asldiv U cret U csv + U indir U lmod U ncsv U wrelop +cgets.obj D _cgets U _getche U cret U csv + U indir U ncsv +cputs.obj D _cputs U _putch U cret U csv + U indir U ncsv +sscanf.obj U __doscan D _sscanf U _strlen U cret + U indir U ncsv +scanf.obj U __doscan U __iob D _scanf U cret + U csv U indir U ncsv +doscan.obj U __ctype_ D __doscan U _atoi U _fgetc + U _tolower U _ungetc U cret U csv + U indir U lladd U llmul U ncsv + U wrelop +ungetc.obj D _ungetc U cret U csv U indir + U ncsv +fgetc.obj U __filbuf D _fgetc +filbuf.obj D __filbuf U _read U cret U csv + U indir U ncsv U wrelop +stdclean.obj D __cleanup D __iob D __sibuf U _fclose + U cret U csv U indir U ncsv +fclose.obj U __buffree U _close D _fclose U _fflush + U cret U csv U indir U ncsv +fflush.obj D _fflush U _write U cret U csv + U indir U ncsv +buf.obj D __bufallo D __buffree U _sbrk U cret + U csv U indir U ncsv +exit.obj U __cleanup U __exit D _exit U cret + U csv U indir U ncsv +open.obj U __fcb D __fsize U _bdos U _errno + U _getfcb U _getuid D _open U _putfcb + U _setfcb U _setuid U adiv U aland + U aldiv U amul U asalsub U brelop + U cret U csv U indir U ncsv + U shll U wrelop +read.obj U __fcb U __piped U __putrno U __sigchk + U _bdos U _bmove U _getuid D _read + U _setuid U aldiv U alsub U amul + U asaladd U brelop U cret U indir + U lladd U lrelop U ncsv U wrelop +write.obj U __fcb U __piped U __putrno U __sigchk + U _bdos U _bmove U _getuid U _setuid + D _write U aldiv U amul U arelop + U asaladd U brelop U cret U indir + U ncsv U wrelop +seek.obj U __fcb D _lseek U aladd U amul + U arelop U brelop U cret U csv + U indir U ncsv +stat.obj U _bdos U _convtime U _getuid U _setfcb + U _setuid D _stat U asallsh U asalsub + U cret U indir U lladd U lllsh + U ncsv U shal U wrelop +chmod.obj U _bdos D _chmod U _getuid U _setfcb + U _setuid U cret U indir U ncsv +fcbname.obj U __fcb U _bdos D _fcbname U _sprintf + U _strlen U amul U cret U csv + U indir U ncsv U wrelop +rename.obj U _bdos D _rename U _setfcb U _unlink + U cret U indir U ncsv +creat.obj U __fcb U _bdos D _creat U _errno + U _getfcb U _getuid U _setfcb U _setuid + U _unlink U adiv U cret U csv + U indir U ncsv U wrelop +time.obj U _bdos U _convtime D _time U cret + U indir U ncsv +convtime.obj D _convtime D _frmbcd U asaladd U asalmul + U cret U csv U indir U lmul + U ncsv +timezone.obj D _time_zone +isatty.obj U __fcb D _isatty U amul U cret + U csv U indir U ncsv +close.obj U __fcb U _bdos D _close U _getuid + U _setuid U amul U brelop U cret + U csv U indir U ncsv +unlink.obj U _bdos U _errno U _getuid U _setfcb + U _setuid D _unlink U cret U indir + U ncsv +dup.obj U __fcb D _dup U _getfcb U adiv + U amul U cret U csv U indir + U ncsv +execl.obj U _bmove D _execl D _execv U _setfcb + U _strcat U _strlen U _strncpy U indir +getfcb.obj U __ctype_ U __fcb U _atoi D _getfcb + U _getuid D _putfcb D _setfcb U _toupper + U brelop U cret U csv U indir + U ncsv U wrelop +srand1.obj U _kbhit U _putchar U _srand D _srand1 + U cret U csv U indir U ncsv +abort.obj D _abort U _bdos U _exit U cret + U indir U ncsv +getch.obj U _bdos D _getch D _getche D _kbhit + D _putch D _ungetch U cret U csv + U indir U ncsv +signal.obj D __sigchk U _bdos U _exit D _signal + U cret U csv U indir U ncsv +getuid.obj D _getuid D _setuid U cret U csv +bdos.obj D _bdos U _errno U cret U csv +bios.obj D _bios U cret U csv D exit22 +cleanup.obj D __cpm_clean D __fcb D __putrno U _close + U alrsh U brelop U cret U csv + U indir U ncsv +_exit.obj U __cpm_clean D __exit +fakeclean.obj D __cleanup U cret U indir U ncsv +fakecpcln.obj D __cpm_clean +sys_err.obj D _errno D _sys_err D _sys_ner +memcpy.obj D _memcpy U cret U csv U indir + U ncsv +memcmp.obj D _memcmp U cret U csv U indir + U ncsv +memset.obj D _memset U cret U csv U indir + U ncsv +abs.obj D _abs +asallsh.obj U allsh D asallsh D aslllsh U iregstore +allsh.obj D allsh D lllsh +asalrsh.obj U alrsh D asalrsh U iregstore +asar.obj D asar U shar +asdiv.obj U adiv D asadiv D asldiv U ldiv +asladd.obj U aladd D asaladd D aslladd U iregset + U iregstore +asland.obj U aland D asaland D aslland U iregset + U iregstore +asll.obj D asal D asll U shal +asllrsh.obj D asllrsh U iregstore U llrsh +aslmul.obj U almul D asalmul D asllmul U iregset + U iregstore +aslor.obj U alor D asalor D asllor U iregset + U iregstore +aslsub.obj U alsub D asalsub D asllsub U iregset + U iregstore +aslxor.obj U alxor D asalxor D asllxor U iregset + U iregstore +atoi.obj D _atoi +atol.obj U __ctype_ D _atol U aladd U almul + U cret U indir U ncsv +blkclr.obj D _blkclr +blkcpy.obj D _blkcpy U cret U csv U indir + U ncsv +calloc.obj U _bmove D _calloc D _cfree U _free + U _malloc U asamul U cret U csv + U indir U ncsv +asmul.obj U amul D asamul D aslmul +bitfield.obj D bfext D bfins +ctype_.obj D __ctype_ +getsp.obj D __getsp +index.obj D _index U cret U rcsv +strchr.obj D _strchr U cret U rcsv +inout.obj D _in D _inp D _out D _outp +iregset.obj D iregset D iregstore +isalpha.obj D _isalpha +isdigit.obj D _isdig D _isdigit +islower.obj D _islower +isspace.obj D _isspace +isupper.obj D _isupper +ladd.obj D aladd D lladd +land.obj D aland D lland +linc.obj D ladec D lainc D lldec D llinc +llrsh.obj D llrsh +longjmp.obj D _longjmp D _setjmp +lor.obj D alor D llor +brelop.obj D brelop +wrelop.obj D wrelop +lrelop.obj D arelop D lrelop +frelop.obj D frelop +lsub.obj D alsub D llsub +lxor.obj D alxor D llxor +qsort.obj U __swap U _bmove U _free U _malloc + D _qsort U adiv U cret U indir + U lmul U ncsv U wrelop +malloc.obj U _bmove D _free D _malloc D _realloc + U _sbrk U adiv U amul U cret + U csv U indir U ldiv U lmul + U ncsv U wrelop +max.obj D _max +idiv.obj D adiv D amod D ldiv D lmod +pnum.obj D __pnum U aslldiv U brelop U cret + U indir U llmod U ncsv U wrelop +ldiv.obj D aldiv D almod D asaldiv D asalmod + D aslldiv D asllmod D lldiv D llmod +swap.obj D __swap U cret U rcsv +aslr.obj D aslr U shlr +bmove.obj D _bmove D _movmem +imul.obj D amul D lmul +rand.obj D _rand D _srand U almul U alrsh + U cret U csv U indir U ncsv +alrsh.obj D alrsh +lmul.obj D almul D llmul +rindex.obj D _rindex U cret U rcsv +strrchr.obj D _strrchr U cret U rcsv +sbrk.obj U __Hbss D _brk D _checksp D _sbrk +shar.obj D shar +shll.obj D shal D shll +shlr.obj D shlr +strcat.obj D _strcat +strcmp.obj D _strcmp +strcpy.obj D _strcpy +strlen.obj D _strlen +strncat.obj D _strncat U cret U rcsv +strncmp.obj D _strncmp U cret U rcsv +strncpy.obj D _strncpy U cret U rcsv +strstr.obj D _strstr U cret U csv U indir + U ncsv +strnstr.obj D _strnstr U cret U indir U ncsv +strdup.obj U _malloc U _strcpy D _strdup U _strlen + U cret U csv U indir U ncsv +stricmp.obj D _strcasecmp +stristr.obj D _strcasestr U _toupper U cret U csv + U indir U ncsv +strnicmp.obj D _strncasecmp U cret U rcsv +strnistr.obj D _strncasestr U _toupper U cret U indir + U ncsv +strtok.obj D _strtok U cret U csv U indir + U ncsv U wrelop +strftime.obj D _strftime U adiv U amod U asamod + U cret U indir U ncsv U wrelop +csv.obj D cret D csv D indir D ncsv +rcsv.obj D rcsv +tolower.obj D _tolower +toupper.obj D _toupper +asmod.obj U amod D asamod D aslmod U lmod +xtoi.obj D _ishex D _xtoi diff --git a/gen/PATCH4.SUB b/gen/PATCH4.SUB new file mode 100644 index 0000000..f67cfdc --- /dev/null +++ b/gen/PATCH4.SUB @@ -0,0 +1,14 @@ +; Apply v3.09-4 patch +; +; Additional strXXX() routines that are documented +; but missing from LIBC.LIB +; +; Prerequisites +; Copy new STRING.H and TIME.H to A0: +; All files from the cpm gen & stdio are in the current directory +; +era libc4.sub +complibc.sub +makelibc.sub +; +; The LIBC4.LIB has been created - ready to replace your LIBC.LIB diff --git a/gen/STRCHR#.AS b/gen/STRCHR#.AS new file mode 100644 index 0000000..453dadc --- /dev/null +++ b/gen/STRCHR#.AS @@ -0,0 +1,19 @@ + psect text + global rcsv, cret, _strchr + +_strchr: + call rcsv + + jr 3f +1: + inc hl +3: + ld a,(hl) + or a + jr z,2f + cp e + jr nz,1b +4: jp cret + +2: ld hl,0 + jp 4b diff --git a/gen/STRCHR.AS b/gen/STRCHR.AS index 453dadcbf3256049caa71af0d3f3c97674fe339f..45c33b45518f3098993b5286d21ff22b1e652d34 100644 GIT binary patch literal 383 zcmah^F>b>!5bJsd{0EL{p&>!Gdg=r6g93qkK1Xg<$(0l%$?JQn4Rov~l1GqYhg=f7 zv}0!zUb4Xy3i!EgIxLd%6a$L0D%pT>3WG8M`z@J zlw5r5t*69!G2kS{;Jo%x2kUc$d|#)#=IpulJ8c$FXe=HD(G-)o`rD4`j{GdEH4olb{1T;ZKY)!Q#snb~-m@{jn&$qZd3R fMfK|pdi=)6L{ +extern char *malloc(); + +char * strdup(char * str) +{ + char *dup; + + if ( (dup = malloc(strlen(str)+1)) ) /* add one for the closing \0 */ + return strcpy(dup, str); + return (dup); +} diff --git a/gen/STRFTIME.C b/gen/STRFTIME.C new file mode 100644 index 0000000..df6d893 --- /dev/null +++ b/gen/STRFTIME.C @@ -0,0 +1,343 @@ +/** + * + * strftime.c + * + * implements the ansi c function strftime() + * + * written 6 september 1989 by jim nutt + * released into the public domain by jim nutt + * + * modified 21-Oct-89 by Rob Duff + * +**/ + +#ifndef TZNAME +#define TZNAME "GMT" /* define TZNAME to override to your timezone */ +#endif + +#include /* for size_t */ +#include /* for va_arg */ +#include /* for struct tm */ + +/* +** The following line should be appended to TIME.H. +** Also copy size_t define from STRING.H. +*/ +/* +extern size_t strftime(char *s, size_t maxs, char *f, struct tm *t); +*/ + +static char *aday[] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" +}; + +static char *day[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday" +}; + +static char *amonth[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" +}; + +static char *month[] = { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" +}; + +static char buf[26]; + +static void strfmt(char *str, char *fmt, ...); + +/** + * + * size_t strftime(char *str, + * size_t maxs, + * const char *fmt, + * const struct tm *t) + * + * this functions acts much like a sprintf for time/date output. + * given a pointer to an output buffer, a format string and a + * time, it copies the time to the output buffer formatted in + * accordance with the format string. the parameters are used + * as follows: + * + * str is a pointer to the output buffer, there should + * be at least maxs characters available at the address + * pointed to by str. + * + * maxs is the maximum number of characters to be copied + * into the output buffer, included the '\0' terminator + * + * fmt is the format string. a percent sign (%) is used + * to indicate that the following character is a special + * format character. the following are valid format + * characters: + * + * %A full weekday name (Monday) + * %a abbreviated weekday name (Mon) + * %B full month name (January) + * %b abbreviated month name (Jan) + * %c standard date and time representation + * %d day-of-month (01-31) + * %H hour (24 hour clock) (00-23) + * %I hour (12 hour clock) (01-12) + * %j day-of-year (001-366) + * %M minute (00-59) + * %m month (01-12) + * %p local equivalent of AM or PM + * %S second (00-59) + * %U week-of-year, first day sunday (00-53) + * %W week-of-year, first day monday (00-53) + * %w weekday (0-6, sunday is 0) + * %X standard time representation + * %x standard date representation + * %Y year with century + * %y year without century (00-99) + * %Z timezone name + * %% percent sign + * + * the standard date string is equivalent to: + * + * %a %b %d %Y + * + * the standard time string is equivalent to: + * + * %H:%M:%S + * + * the standard date and time string is equivalent to: + * + * %a %b %d %H:%M:%S %Y + * + * strftime returns the number of characters placed in the + * buffer, not including the terminating \0, or zero if more + * than maxs characters were produced. + * +**/ + +size_t strftime(char *s, size_t maxs, char *f, struct tm *t) +{ + int w; + char *p, *q, *r; + + p = s; + q = s + maxs - 1; + while ((*f != '\0')) + { + if (*f++ == '%') + { + r = buf; + switch (*f++) + { + case '%' : + r = "%"; + break; + + case 'a' : + r = aday[t->tm_wday]; + break; + + case 'A' : + r = day[t->tm_wday]; + break; + + case 'b' : + r = amonth[t->tm_mon]; + break; + + case 'B' : + r = month[t->tm_mon]; + break; + + case 'c' : + strfmt(r, "%0 %0 %2 %2:%2:%2 %4", + aday[t->tm_wday], amonth[t->tm_mon], + t->tm_mday,t->tm_hour, t->tm_min, + t->tm_sec, t->tm_year+1900); + break; + + case 'd' : + strfmt(r,"%2",t->tm_mday); + break; + + case 'H' : + strfmt(r,"%2",t->tm_hour); + break; + + case 'I' : + strfmt(r,"%2",(t->tm_hour%12)?t->tm_hour%12:12); + break; + + case 'j' : + strfmt(r,"%3",t->tm_yday+1); + break; + + case 'm' : + strfmt(r,"%2",t->tm_mon+1); + break; + + case 'M' : + strfmt(r,"%2",t->tm_min); + break; + + case 'p' : + r = (t->tm_hour>11)?"PM":"AM"; + break; + + case 'S' : + strfmt(r,"%2",t->tm_sec); + break; + + case 'U' : + w = t->tm_yday/7; + if (t->tm_yday%7 > t->tm_wday) + w++; + strfmt(r, "%2", w); + break; + + case 'W' : + w = t->tm_yday/7; + if (t->tm_yday%7 > (t->tm_wday+6)%7) + w++; + strfmt(r, "%2", w); + break; + + case 'w' : + strfmt(r,"%1",t->tm_wday); + break; + + case 'x' : + strfmt(r, "%3s %3s %2 %4", aday[t->tm_wday], + amonth[t->tm_mon], t->tm_mday, t->tm_year+1900); + break; + + case 'X' : + strfmt(r, "%2:%2:%2", t->tm_hour, + t->tm_min, t->tm_sec); + break; + + case 'y' : + strfmt(r,"%2",t->tm_year%100); + break; + + case 'Y' : + strfmt(r,"%4",t->tm_year+1900); + break; + + case 'Z' : + r = TZNAME; + break; + + default: + buf[0] = '%'; /* reconstruct the format */ + buf[1] = f[-1]; + buf[2] = '\0'; + if (buf[1] == 0) + f--; /* back up if at end of string */ + } + while (*r) + { + if (p == q) + { + *q = '\0'; + return 0; + } + *p++ = *r++; + } + } + else + { + if (p == q) + { + *q = '\0'; + return 0; + } + *p++ = f[-1]; + } + } + *p = '\0'; + return p - s; +} + +/* + * stdarg.h + * +typedef void *va_list; +#define va_start(vp,v) (vp=((char*)&v)+sizeof(v)) +#define va_arg(vp,t) (*((t*)(vp))++) +#define va_end(vp) + * + */ + +static int pow[5] = { 1, 10, 100, 1000, 10000 }; + +/** + * static void strfmt(char *str, char *fmt); + * + * simple sprintf for strftime + * + * each format descriptor is of the form %n + * where n goes from zero to four + * + * 0 -- string %s + * 1..4 -- int %?.?d + * +**/ + +static void strfmt(char *str, char *fmt, ...) +{ + int ival, ilen; + char *sval; + va_list vp; + + va_start(vp, fmt); + while (*fmt) + { + if (*fmt++ == '%') + { + ilen = *fmt++ - '0'; + if (ilen == 0) /* zero means string arg */ + { + sval = va_arg(vp, char*); + while (*sval) + *str++ = *sval++; + } + else /* always leading zeros */ + { + ival = va_arg(vp, int); + while (ilen) + { + ival %= pow[ilen--]; + *str++ = '0' + ival / pow[ilen]; + } + } + } + else *str++ = fmt[-1]; + } + *str = '\0'; + va_end(vp); +} + +#ifdef TEST + +#include /* for printf */ +#include /* for strftime */ + +char test[80]; + +int main(int argc, char *argv[]) +{ + int len; + char *fmt; + time_t now; + + time(&now); + + fmt = (argc == 1) ? "%I:%M %p\n%c\n" : argv[1]; + len = strftime(test,sizeof test, fmt, localtime(&now)); + printf("%d: %s\n", len, test); + return !len; +} + +#endif /* TEST */ diff --git a/gen/STRICMP.AS b/gen/STRICMP.AS new file mode 100644 index 0000000..f92aa4d --- /dev/null +++ b/gen/STRICMP.AS @@ -0,0 +1,47 @@ +; int strcasecmp(const char *s1, const char *s2) +; return a value less than 0, 0 or greater than 0 if s1 is found, respectively, +; to be less than equal or greater than s2 ignoring case +; by Arnold M + +psect text + +macro tolower + cp 'A' + jr c, 10f + cp 'Z'+1 + jr nc, 10f + add a, 'a'-'A' +10: +endm + +global _strcasecmp +_strcasecmp: + +pop bc +pop hl ; s1 +pop de ; s2 +push de +push hl +push bc + +1: +ld a,(de) ;*s2 +tolower +ld c,a +ld a,(hl) ;*s1 +tolower +cp c +jr nz,2f +inc hl +inc de +or a +jp nz,1b +ld h,a +ld l,a +ret + +2: +sbc hl,hl +ret c +inc hl +ret diff --git a/gen/STRISTR.C b/gen/STRISTR.C new file mode 100644 index 0000000..4da93a0 --- /dev/null +++ b/gen/STRISTR.C @@ -0,0 +1,34 @@ +/* + * char * strcasestr (char *t, char *s) + * + * Find string s in string t, disregarding the case of letters. + * + * Return + * - The smallest pointer p between t and t+strlen(t) inclusive, such that + * the characters from s upto but not including the first NUL character + * can be found starting from p, or + * - NULL if there is no such pointer. + */ +#include + +char * strcasestr (char *t, char *s) +{ + char *t1; + char *s1; + + do + { + t1 = t; + s1 = s; + while(*s1) { + if (toupper(*s1) != toupper(*(t1++))) + break; + else + ++s1; + } + if (!*s1) return t; + } + while (*(t++)); + + return (char *) 0; +} diff --git a/gen/STRNICMP.AS b/gen/STRNICMP.AS new file mode 100644 index 0000000..e43d2f6 --- /dev/null +++ b/gen/STRNICMP.AS @@ -0,0 +1,54 @@ +; int strncasecmp(const char *s1, const char *s2, size_t n) +; return a value less than 0, 0 or greater than 0 if s1 is found, respectively, +; to be less than equal or greater than s2 ignoring case +; by Arnold M + +psect text + +macro tolower + cp 'A' + jr c, 10f + cp 'Z'+1 + jr nc, 10f + add a, 'a'-'A' +10: +endm + +global _strncasecmp, rcsv, cret + +_strncasecmp: + call rcsv ; hl=s1, de=s2, bc=n + ld b,c ; keep low part of n in reg b, reg c is used as scratch + ld a,b + or a + jr z,bzero +loop: + ld a,(de) ;*s2 + tolower + ld c,a + ld a,(hl) ;*s1 + tolower + cp c + jr nz,diff + or a + jr z, equal + inc hl + inc de + djnz loop +bzero: + dec (ix+6+5) ; n / 0x100 + jp p,loop ; dec m does not affect the carry flag + ld a,(ix+6+5) + inc a + jr nz,loop + +equal: + ld h,a + ld l,a + jp cret + +diff: + sbc hl,hl + jp c,cret + inc hl + jp cret diff --git a/gen/STRNISTR.C b/gen/STRNISTR.C new file mode 100644 index 0000000..35e92f7 --- /dev/null +++ b/gen/STRNISTR.C @@ -0,0 +1,38 @@ +/* + * char * strncasestr (char *t, char *s, unsigned int n) + * + * Find string s in string t, disregarding the case of letters. + * At most n characters from t are used. + * + * Returns + * - A smallest pointer p between t and t+strlen(t) inclusive, such that + * the characters from s upto but not including the first NUL character + * can be found starting from p and strictly before t+n, or + * - NULL if there is no such pointer. + */ +#include + +char * strncasestr (char *t, char *s, unsigned int n) +{ + char *t1; + char *s1; + unsigned int n1; + + if (!*s) return t; + while (*t && n) { + t1 = t; + n1 = n; + s1 = s; + while (*s1) { + if (toupper(*s1) != toupper(*(t1++))) break; + else { + ++s1; + if (!--n1) break; + } + } + if (!*s1) return t; + --n; + ++t; + } + return (char *) 0; +} diff --git a/gen/STRNSTR.C b/gen/STRNSTR.C new file mode 100644 index 0000000..65a32c7 --- /dev/null +++ b/gen/STRNSTR.C @@ -0,0 +1,35 @@ +/* + * char * strnstr (char *t, char *s, unsigned int n) + * + * Find string s in string t, using at most n characters from t. + * + * Returns + * - A smallest pointer p between t and t+strlen(t) inclusive, such that + * the characters from s upto but not including the first NUL character + * can be found starting from p and strictly before t+n, or + * - NULL if there is no such pointer. + */ +char * strnstr (char *t, char *s, unsigned int n) +{ + char *t1; + char *s1; + unsigned int n1; + + if (!*s) return t; + while (*t && n) { + t1 = t; + n1 = n; + s1 = s; + while (*s1) { + if (*s1 != *(t1++)) break; + else { + ++s1; + if (!--n1) break; + } + } + if (!*s1) return t; + --n; + ++t; + } + return (char *) 0; +} diff --git a/gen/STRRCHR#.AS b/gen/STRRCHR#.AS new file mode 100644 index 0000000..5b653ec --- /dev/null +++ b/gen/STRRCHR#.AS @@ -0,0 +1,28 @@ + psect text + global rcsv, cret, _strrchr + +_strrchr: + call rcsv + + ld bc,0 + jr 5f +6: + inc hl + inc bc +5: + ld a,(hl) + or a + jr nz,6b +1: + dec hl + ld a,c + or b + jr z,2f + dec bc + ld a,(hl) + cp e + jr nz,1b +4: jp cret + +2: ld hl,0 + jp 4b diff --git a/gen/STRRCHR.AS b/gen/STRRCHR.AS index 5b653ec..443e92e 100644 --- a/gen/STRRCHR.AS +++ b/gen/STRRCHR.AS @@ -1,10 +1,18 @@ +; strrchr(char *s, int c) +; version that can find the closing \0 by Arnold M + psect text - global rcsv, cret, _strrchr + global rcsv, cret, _strrchr ; also equivalent to _rindex _strrchr: - call rcsv + pop bc + pop hl + pop de + push de + push hl + push bc - ld bc,0 + ld bc,1 ; the closing nul is considered part of the string here jr 5f 6: inc hl @@ -14,15 +22,10 @@ _strrchr: or a jr nz,6b 1: - dec hl - ld a,c - or b - jr z,2f - dec bc - ld a,(hl) - cp e - jr nz,1b -4: jp cret - -2: ld hl,0 - jp 4b + ld a,e + cpdr + inc hl + ret z + ld l,c + ld h,b + ret diff --git a/gen/STRSTR.C b/gen/STRSTR.C new file mode 100644 index 0000000..9471372 --- /dev/null +++ b/gen/STRSTR.C @@ -0,0 +1,32 @@ +/* + * char * strstr (char *t, char *s) + * + * Find string s in string t. + * + * Return + * - The smallest pointer p between t and t+strlen(t) inclusive, such that + * the characters from s upto but not including the first NUL character + * can be found starting from p, or + * - NULL if there is no such pointer. + */ +char * strstr (char *t, char *s) +{ + char *t1; + char *s1; + + do + { + t1 = t; + s1 = s; + while(*s1) { + if (*s1 != *(t1++)) + break; + else + ++s1; + } + if (!*s1) return t; + } + while (*(t++)); + + return (char *) 0; +} diff --git a/gen/STRTOK.C b/gen/STRTOK.C new file mode 100644 index 0000000..bdd01e8 --- /dev/null +++ b/gen/STRTOK.C @@ -0,0 +1,39 @@ +/* +** strtok() -- public domain by Ray Gardner, modified by Bob Stout +** not modified for Hi-Tech C by Pierre Gielen :-) +** comment corrected by Arnold Metselaar +** +** You pass this function a string to parse, a buffer to receive the +** "token" that gets scanned, the length of the buffer, and a string of +** "break" characters that stop the scan. It will copy the string into +** the buffer up to any of the break characters, or until the buffer is +** full, and will always leave the buffer null-terminated. It will +** return a pointer to the first character from s that was not copied to +** tok. +*/ + +#include + +char *strtok(char *s, char *tok, size_t toklen, char *brk) +{ + char *lim, *b; + + if (!*s) + return NULL; + + lim = tok + toklen - 1; + while (*s && (tok modules3.prn diff --git a/stdio/LISTMODC.SUB b/stdio/LISTMODC.SUB index 76b98ff..85c92fc 100644 --- a/stdio/LISTMODC.SUB +++ b/stdio/LISTMODC.SUB @@ -1 +1 @@ -libr s libc3.lib > modules3.prn +libr s libc4.lib > modules4.prn diff --git a/stdio/MAKELIB#.SUB b/stdio/MAKELIB#.SUB new file mode 100644 index 0000000..e1f0797 --- /dev/null +++ b/stdio/MAKELIB#.SUB @@ -0,0 +1,153 @@ +; Use librarian to replace all modules in LIBC3.LIB +; NB: the ordering is important for resolving dependencies at link time +libr + /* for printf */ +#include /* for strftime */ + +char test[80]; + +int main(int argc, char *argv[]) +{ + int len; + char *fmt; + time_t now; + + time(&now); + + fmt = (argc == 1) ? "%I:%M %p\n%c\n" : argv[1]; + len = strftime(test,sizeof test, fmt, localtime(&now)); + printf("%d: %s\n", len, test); + return !len; +}