mirror of
https://github.com/brouhaha/dis6502.git
synced 2024-06-15 19:29:28 +00:00
Use system header for malloc() rather than local declaration.
This commit is contained in:
parent
5f72d0b1fe
commit
4e6c6df632
6
lex.l
6
lex.l
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith
|
* dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith
|
||||||
*
|
*
|
||||||
* $Id: lex.l,v 1.6 2003/09/16 12:00:00 eric Exp $
|
* $Id$
|
||||||
* Copyright 2001-2003 Eric Smith <eric@brouhaha.com>
|
* Copyright 2001-2003 Eric Smith <eric@brouhaha.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
%{
|
%{
|
||||||
#undef ECHO
|
#undef ECHO
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "dis.h"
|
#include "dis.h"
|
||||||
int lineno = 0;
|
int lineno = 0;
|
||||||
char *strcpy();
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%option nounput
|
%option nounput
|
||||||
|
@ -91,7 +91,7 @@ char *
|
||||||
emalloc(n)
|
emalloc(n)
|
||||||
unsigned n;
|
unsigned n;
|
||||||
{
|
{
|
||||||
char *ptr, *malloc();
|
char *ptr;
|
||||||
|
|
||||||
if ((ptr = malloc(n)) == (char *) 0) {
|
if ((ptr = malloc(n)) == (char *) 0) {
|
||||||
(void) fprintf(stderr,"out of core");
|
(void) fprintf(stderr,"out of core");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user