Changeset 5c13d64 in buchla-68k
- Timestamp:
- 07/09/2017 01:36:31 PM (7 years ago)
- Branches:
- master
- Children:
- 0292fbb
- Parents:
- 002f873
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
include/memory.h
r002f873 r5c13d64 6 6 */ 7 7 8 extern char *memccpy(char *s1, char *s2, char c, int n);9 extern char *memchr(char *sp, char c, int n);10 extern char *memcpy(char *s1, char *s2, int n);11 extern char *memset(char *sp, char c, int n);12 extern int memcmp( char *s1, char *s2, int n);13 extern short *memsetw(short *sp, short w, short n);14 extern short *memcpyw(short *s1, short *s2, int n);15 extern int memcmpu( char *s1, char *s2, int n);8 extern void *memccpy(void *vp1, void *vp2, char c, int n); 9 extern void *memchr(void *vp, char c, int n); 10 extern void *memcpy(void *vp1, void *vp2, int n); 11 extern void *memset(void *vp, char c, int n); 12 extern int memcmp(void *vp1, void *vp2, int n); 13 extern void *memsetw(void *vp, short s, short n); 14 extern void *memcpyw(void *vp1, void *vp2, int n); 15 extern int memcmpu(void *vp1, void *vp2, int n); -
libcio/conin.c
r002f873 r5c13d64 14 14 #include "stddefs.h" 15 15 16 extern char *memcpy(char *s1, char *s2, int n);16 extern void *memcpy(void *vp1, void *vp2, int n); 17 17 extern int readbuf(int dev, char *buf); 18 18 extern void writeln(int unit, char *buf); -
libcio/read.c
r002f873 r5c13d64 50 50 extern int _seek(struct fcb *fcp); 51 51 52 extern char *memcpy(char *s1, char *s2, int n);52 extern void *memcpy(void *vp1, void *vp2, int n); 53 53 54 54 int _filerd(struct fcb *fp, char *buffer, unsigned len); -
libcio/write.c
r002f873 r5c13d64 26 26 extern long miconl(long wi); 27 27 28 extern char *memset(char *sp, char c, int n);28 extern void *memset(void *vp, char c, int n); 29 29 30 30 extern int _fatmod; -
libsm/memccpy.c
r002f873 r5c13d64 4 4 Version 1 -- 1987-06-12 5 5 6 Copy s2 to s1, stopping if character c is copied.6 Copy vp2 to vp1, stopping if character c is copied. 7 7 Copy no more than n bytes. 8 8 Return a pointer to the byte after character c in the copy, … … 11 11 */ 12 12 13 char *memccpy(char *s1, char *s2, char c, int n)13 void *memccpy(void *vp1, void *vp2, char c, int n) 14 14 { 15 while (--n >= 0) 16 if ((*s1++ = *s2++) == c) 17 return(s1); 18 return((char *)0); 15 char *cp1 = vp1; 16 char *cp2 = vp2; 17 18 while (--n >= 0) 19 if ((*cp1++ = *cp2++) == c) 20 return(cp1); 21 22 return((void *)0); 19 23 } -
libsm/memchr.c
r002f873 r5c13d64 4 4 Version 1 -- 1987-06-12 5 5 6 Return the ptr in sp at which the character c appears;6 Return the ptr in vp at which the character c appears; 7 7 NULL if not found in n chars; don't stop at \0. 8 8 ============================================================================= 9 9 */ 10 10 11 char *memchr(char *sp, char c, int n)11 void *memchr(void *vp, char c, int n) 12 12 { 13 while (--n >= 0) 14 if (*sp++ == c) 15 return(--sp); 16 return((char *)0); 13 char *cp = vp; 14 15 while (--n >= 0) 16 if (*cp++ == c) 17 return(--cp); 18 19 return((void *)0); 17 20 } -
libsm/memcmp.c
r002f873 r5c13d64 4 4 Version 2 -- 1987-06-15 5 5 6 Compare n bytes: s1>s2: >0 s1==s2: 0 s1<s2: <06 Compare n bytes: vp1>vp2: >0 vp1==vp2: 0 vp1<vp2: <0 7 7 ============================================================================= 8 8 */ 9 9 10 int memcmp( char *s1, char *s2, int n)10 int memcmp(void *vp1, void *vp2, int n) 11 11 { 12 char *cp1 = vp1; 13 char *cp2 = vp2; 12 14 register int diff; 13 15 14 if (s1 != s2) 15 while (--n >= 0) 16 if (diff = *s1++ - *s2++) 17 return(diff); 18 return(0); 16 if (cp1 != cp2) 17 while (--n >= 0) 18 if (diff = *cp1++ - *cp2++) 19 return(diff); 20 21 return(0); 19 22 } -
libsm/memcmpu.c
r002f873 r5c13d64 8 8 #include "ctype.h" 9 9 10 int memcmpu( char *s1, char *s2, int n)10 int memcmpu(void *vp1, void *vp2, int n) 11 11 { 12 char *cp1 = vp1; 13 char *cp2 = vp2; 12 14 register char c1, c2; 13 15 14 16 while (n) { 15 17 16 c1 = * s1++;17 c2 = * s2++;18 c1 = *cp1++; 19 c2 = *cp2++; 18 20 19 21 if (isascii(c1) && islower(c1)) -
libsm/memcpy.c
r002f873 r5c13d64 4 4 Version 1 -- 1987-06-12 5 5 6 Copy s2 to s1, always copy n bytes.7 Return s1.6 Copy vp2 to vp1, always copy n bytes. 7 Return vp1. 8 8 ============================================================================= 9 9 */ 10 10 11 char *memcpy(char *s1, char *s2, int n)11 void *memcpy(void *vp1, void *vp2, int n) 12 12 { 13 register char *os1 = s1; 13 char *cp1 = vp1; 14 char *cp2 = vp2; 14 15 15 while (--n >= 0) 16 *s1++ = *s2++; 17 return (os1); 16 while (--n >= 0) 17 *cp1++ = *cp2++; 18 19 return(vp1); 18 20 } -
libsm/memcpyw.c
r002f873 r5c13d64 4 4 Version 2 -- 1987-06-15 -- D.N. Lynx Crowe 5 5 6 Copy s2 to s1, always copy n words.7 Return pointer to s1.6 Copy vp2 to vp1, always copy n words. 7 Return pointer to vp1. 8 8 ============================================================================= 9 9 */ 10 10 11 short *memcpyw(short *s1, short *s2, int n)11 void *memcpyw(void *vp1, void *vp2, int n) 12 12 { 13 register short *os1 = s1; 13 short *sp1 = vp1; 14 short *sp2 = vp2; 14 15 15 while (--n >= 0) 16 *s1++ = *s2++; 17 return (os1); 16 while (--n >= 0) 17 *sp1++ = *sp2++; 18 19 return(vp1); 18 20 } -
libsm/memset.c
r002f873 r5c13d64 4 4 Version 1 -- 1987-06-12 5 5 6 Set an array of n chars starting at sp to the character c.7 Return sp.6 Set an array of n chars starting at vp to the character c. 7 Return vp. 8 8 ============================================================================= 9 9 */ 10 10 11 char *memset(char *sp, char c, int n)11 void *memset(void *vp, char c, int n) 12 12 { 13 register char *sp0 = sp;13 char *cp = vp; 14 14 15 16 *sp++ = c;15 while (--n >= 0) 16 *cp++ = c; 17 17 18 return(sp0);18 return(vp); 19 19 } -
libsm/memsetw.c
r002f873 r5c13d64 4 4 Version 1 -- 1987-03-18 -- D.N. Lynx Crowe 5 5 6 Set an array of n shorts starting at sp to the short w.7 Return pointer to sp.6 Set an array of n shorts starting at vp to the short s. 7 Return pointer to vp. 8 8 ============================================================================= 9 9 */ 10 10 11 short *memsetw(short *sp, short w, short n)11 void *memsetw(void *vp, short s, short n) 12 12 { 13 register short *sp0 = sp;13 short *sp = vp; 14 14 15 16 *sp++ = w;15 while (--n >= 0) 16 *sp++ = s; 17 17 18 return(sp0);18 return(vp); 19 19 } -
ram/adfield.c
r002f873 r5c13d64 86 86 extern void vcputsv(int *obase, int nw, int fg, int bg, int row, int col, char *str, int pitch); 87 87 88 extern char *memset(char *sp, char c, int n);88 extern void *memset(void *vp, char c, int n); 89 89 90 90 extern short adnamsw; -
ram/idfield.c
r002f873 r5c13d64 87 87 extern unsigned fromfpu(unsigned fputime); 88 88 89 extern char *memset(char *sp, char c, int n);89 extern void *memset(void *vp, char c, int n); 90 90 91 91 /* -
ram/ldfield.c
r002f873 r5c13d64 49 49 extern unsigned exp_c(unsigned c); 50 50 51 extern char *memset(char *sp, char c, int n);51 extern void *memset(void *vp, char c, int n); 52 52 extern char *slotnam(unsigned slot, unsigned kind); 53 53 -
ram/scfield.c
r002f873 r5c13d64 24 24 /* functions defined elsewhere */ 25 25 26 extern char *memset(char *sp, char c, int n);26 extern void *memset(void *vp, char c, int n); 27 27 28 28 extern void cxkstd(void); -
ram/tdfield.c
r002f873 r5c13d64 44 44 extern short nd_tpch(short nn, short k); 45 45 46 extern char *memset(char *sp, char c, int n);46 extern void *memset(void *vp, char c, int n); 47 47 48 48 extern short cxval, cyval, cxrate, cyrate;
Note:
See TracChangeset
for help on using the changeset viewer.