Make gcc 4.0 happy by removing internal static declaration of
write_integer and moving this function above its first point of usage.
This commit is contained in:
parent
ed254f1366
commit
0698e636f1
38
c/unix/io.c
38
c/unix/io.c
|
@ -146,26 +146,6 @@ ps_write_char(char ch, FILE *port)
|
||||||
return 0; }
|
return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
long
|
|
||||||
ps_write_integer(long n, FILE *port)
|
|
||||||
{
|
|
||||||
int status;
|
|
||||||
|
|
||||||
static long write_integer(unsigned long n, FILE *port);
|
|
||||||
|
|
||||||
if (n == 0) {
|
|
||||||
WRITE_CHAR('0', port, status);
|
|
||||||
return status; }
|
|
||||||
else if (n > 0)
|
|
||||||
return write_integer(n, port);
|
|
||||||
else {
|
|
||||||
WRITE_CHAR('-', port, status);
|
|
||||||
if (status == 0)
|
|
||||||
return write_integer(- n, port);
|
|
||||||
else
|
|
||||||
return status; }
|
|
||||||
}
|
|
||||||
|
|
||||||
static long
|
static long
|
||||||
write_integer(unsigned long n, FILE *port)
|
write_integer(unsigned long n, FILE *port)
|
||||||
{
|
{
|
||||||
|
@ -182,6 +162,24 @@ write_integer(unsigned long n, FILE *port)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
ps_write_integer(long n, FILE *port)
|
||||||
|
{
|
||||||
|
int status;
|
||||||
|
|
||||||
|
if (n == 0) {
|
||||||
|
WRITE_CHAR('0', port, status);
|
||||||
|
return status; }
|
||||||
|
else if (n > 0)
|
||||||
|
return write_integer(n, port);
|
||||||
|
else {
|
||||||
|
WRITE_CHAR('-', port, status);
|
||||||
|
if (status == 0)
|
||||||
|
return write_integer(- n, port);
|
||||||
|
else
|
||||||
|
return status; }
|
||||||
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
ps_write_string(char *string, FILE *port)
|
ps_write_string(char *string, FILE *port)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue