diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-30 15:33:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-30 15:33:51 -0700 |
commit | 118ee5f944912f19db268d1d2d18fa70a3fd7d6f (patch) | |
tree | 90f0e13019d5a991e60751914bf189020bf49f6b | |
parent | b9deaf1bd83c0f04090faa97f1f945236a589e51 (diff) | |
download | uemacs-118ee5f944912f19db268d1d2d18fa70a3fd7d6f.tar.gz |
Fix up headers and bogus re-definitions to use <stdlib.h> and <string.h>
Hey, it's already compiling cleaner. Getting proper function declarations
will be a bitch, though.
-rw-r--r-- | buffer.c | 1 | ||||
-rw-r--r-- | display.c | 1 | ||||
-rw-r--r-- | edef.h | 7 | ||||
-rw-r--r-- | eval.c | 37 | ||||
-rw-r--r-- | line.c | 1 | ||||
-rw-r--r-- | main.c | 31 | ||||
-rw-r--r-- | search.c | 2 | ||||
-rw-r--r-- | window.c | 1 |
8 files changed, 3 insertions, 78 deletions
@@ -450,7 +450,6 @@ register char *bname; register BUFFER *bp; register BUFFER *sb; /* buffer to insert after */ register LINE *lp; - char *malloc(); bp = bheadp; while (bp != NULL) { @@ -56,7 +56,6 @@ vtinit() { register int i; register VIDEO *vp; - char *malloc(); TTopen(); /* open the screen */ TTkopen(); /* open the keyboard */ @@ -10,6 +10,9 @@ /* some global fuction declarations */ +#include <stdlib.h> +#include <string.h> + char *flook(); char *getctext(); char *getfname(); @@ -19,12 +22,8 @@ char *gtfun(); char *gtusr(); char *itoa(); char *ltos(); -char *malloc(); char *mklower(); char *mkupper(); -char *strcat(); -char *strcpy(); -char *strncpy(); char *token(); char *transbind(); unsigned int getckey(); @@ -660,43 +660,6 @@ char *value; /* value to set to */ return (status); } -/* atoi: ascii string to integer......This is too - inconsistant to use the system's */ - -atoi(st) - -char *st; - -{ - int result; /* resulting number */ - int sign; /* sign of resulting number */ - char c; /* current char being examined */ - - result = 0; - sign = 1; - - /* skip preceding whitespace */ - while (*st == ' ' || *st == '\t') - ++st; - - /* check for sign */ - if (*st == '-') { - sign = -1; - ++st; - } - if (*st == '+') - ++st; - - /* scan digits, build value */ - while ((c = *st++)) - if (c >= '0' && c <= '9') - result = result * 10 + c - '0'; - else - return (0); - - return (result * sign); -} - /* itoa: integer to ascii string.......... This is too inconsistant to use the system's */ @@ -33,7 +33,6 @@ register int used; { register LINE *lp; register int size; - char *malloc(); size = (used + NBLOCK - 1) & ~(NBLOCK - 1); if (size == 0) /* Assume that an empty */ @@ -118,7 +118,6 @@ char *argv[]; /* argument strings */ int cryptflag; /* encrypting on the way in? */ char ekey[NPAT]; /* startup encryption key */ #endif - char *strncpy(); extern *pathname[]; /* startup file path/name array */ int newc; #if PKCODE @@ -436,7 +435,6 @@ char bname[]; { register BUFFER *bp; register WINDOW *wp; - char *malloc(); bp = bfind(bname, TRUE, 0); /* First buffer */ blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */ @@ -733,35 +731,6 @@ unarg() /***** Compiler specific Library functions ****/ -#if MSDOS || PKCODE -/* strncpy: copy a string...with length restrictions - ALWAYS null terminate -*/ - -char *strncpy(dst, src, maxlen) - -char *dst; /* destination of copied string */ -char *src; /* source */ -int maxlen; /* maximum length */ - -{ - char *dptr; /* ptr into dst */ - - dptr = dst; -/* while (*src && (maxlen-- > 0)) - *dptr++ = *src++; */ - while ((maxlen > 0) && *src) { - *dptr++ = *src++; - maxlen--; - } - - *dptr = 0; /* orig */ -/* if (maxlen > 0) - *dptr = 0; */ - return (dst); -} -#endif - #if RAMSIZE /* These routines will allow me to track memory usage by placing a layer on top of the standard system malloc() and free() calls. @@ -1481,8 +1481,6 @@ BITMAP cclmap; */ static BITMAP clearbits() { - char *malloc(); - BITMAP cclstart, cclmap; register int j; @@ -326,7 +326,6 @@ int f, n; /* default flag and numeric argument */ register int ntrd; register WINDOW *wp1; register WINDOW *wp2; - char *malloc(); if (curwp->w_ntrows < 3) { mlwrite("Cannot split a %d line window", curwp->w_ntrows); |