1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-23 09:36:31 -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

View File

@ -450,7 +450,6 @@ register char *bname;
register BUFFER *bp; register BUFFER *bp;
register BUFFER *sb; /* buffer to insert after */ register BUFFER *sb; /* buffer to insert after */
register LINE *lp; register LINE *lp;
char *malloc();
bp = bheadp; bp = bheadp;
while (bp != NULL) { while (bp != NULL) {

View File

@ -56,7 +56,6 @@ vtinit()
{ {
register int i; register int i;
register VIDEO *vp; register VIDEO *vp;
char *malloc();
TTopen(); /* open the screen */ TTopen(); /* open the screen */
TTkopen(); /* open the keyboard */ TTkopen(); /* open the keyboard */

7
edef.h
View File

@ -10,6 +10,9 @@
/* some global fuction declarations */ /* some global fuction declarations */
#include <stdlib.h>
#include <string.h>
char *flook(); char *flook();
char *getctext(); char *getctext();
char *getfname(); char *getfname();
@ -19,12 +22,8 @@ char *gtfun();
char *gtusr(); char *gtusr();
char *itoa(); char *itoa();
char *ltos(); char *ltos();
char *malloc();
char *mklower(); char *mklower();
char *mkupper(); char *mkupper();
char *strcat();
char *strcpy();
char *strncpy();
char *token(); char *token();
char *transbind(); char *transbind();
unsigned int getckey(); unsigned int getckey();

37
eval.c
View File

@ -660,43 +660,6 @@ char *value; /* value to set to */
return (status); 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 /* itoa: integer to ascii string.......... This is too
inconsistant to use the system's */ inconsistant to use the system's */

1
line.c
View File

@ -33,7 +33,6 @@ register int used;
{ {
register LINE *lp; register LINE *lp;
register int size; register int size;
char *malloc();
size = (used + NBLOCK - 1) & ~(NBLOCK - 1); size = (used + NBLOCK - 1) & ~(NBLOCK - 1);
if (size == 0) /* Assume that an empty */ if (size == 0) /* Assume that an empty */

31
main.c
View File

@ -118,7 +118,6 @@ char *argv[]; /* argument strings */
int cryptflag; /* encrypting on the way in? */ int cryptflag; /* encrypting on the way in? */
char ekey[NPAT]; /* startup encryption key */ char ekey[NPAT]; /* startup encryption key */
#endif #endif
char *strncpy();
extern *pathname[]; /* startup file path/name array */ extern *pathname[]; /* startup file path/name array */
int newc; int newc;
#if PKCODE #if PKCODE
@ -436,7 +435,6 @@ char bname[];
{ {
register BUFFER *bp; register BUFFER *bp;
register WINDOW *wp; register WINDOW *wp;
char *malloc();
bp = bfind(bname, TRUE, 0); /* First buffer */ bp = bfind(bname, TRUE, 0); /* First buffer */
blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */ blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */
@ -733,35 +731,6 @@ unarg()
/***** Compiler specific Library functions ****/ /***** 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 #if RAMSIZE
/* These routines will allow me to track memory usage by placing /* These routines will allow me to track memory usage by placing
a layer on top of the standard system malloc() and free() calls. a layer on top of the standard system malloc() and free() calls.

View File

@ -1481,8 +1481,6 @@ BITMAP cclmap;
*/ */
static BITMAP clearbits() static BITMAP clearbits()
{ {
char *malloc();
BITMAP cclstart, cclmap; BITMAP cclstart, cclmap;
register int j; register int j;

View File

@ -326,7 +326,6 @@ int f, n; /* default flag and numeric argument */
register int ntrd; register int ntrd;
register WINDOW *wp1; register WINDOW *wp1;
register WINDOW *wp2; register WINDOW *wp2;
char *malloc();
if (curwp->w_ntrows < 3) { if (curwp->w_ntrows < 3) {
mlwrite("Cannot split a %d line window", curwp->w_ntrows); mlwrite("Cannot split a %d line window", curwp->w_ntrows);