mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 23:36:23 -05:00
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.
This commit is contained in:
parent
b9deaf1bd8
commit
118ee5f944
1
buffer.c
1
buffer.c
@ -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 */
|
||||
|
7
edef.h
7
edef.h
@ -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();
|
||||
|
37
eval.c
37
eval.c
@ -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 */
|
||||
|
||||
|
1
line.c
1
line.c
@ -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 */
|
||||
|
31
main.c
31
main.c
@ -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.
|
||||
|
2
search.c
2
search.c
@ -1481,8 +1481,6 @@ BITMAP cclmap;
|
||||
*/
|
||||
static BITMAP clearbits()
|
||||
{
|
||||
char *malloc();
|
||||
|
||||
BITMAP cclstart, cclmap;
|
||||
register int j;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user