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 *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) {
|
||||||
|
@ -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
7
edef.h
@ -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
37
eval.c
@ -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
1
line.c
@ -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
31
main.c
@ -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.
|
||||||
|
2
search.c
2
search.c
@ -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;
|
||||||
|
|
||||||
|
1
window.c
1
window.c
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user