1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-23 11:41:15 -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:
Linus Torvalds
2005-09-30 15:33:51 -07:00
parent b9deaf1bd8
commit 118ee5f944
8 changed files with 3 additions and 78 deletions

31
main.c
View File

@@ -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.