Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
652 B

// Copyright (c) 1993-1999 Microsoft Corporation
#include "y4.h"
#include <ctype.h>
gtnm()
{
register s, val, c;
/* read and convert an integer from the standard input */
/* return the terminating character */
/* blanks, tabs, and newlines are ignored */
s = 1;
val = 0;
while( (c=unix_getc(finput)) != EOF )
{
if( isdigit(c) )
{
val = val * 10 + c - '0';
}
else if ( c == '-' ) s = -1;
else if ( c == '\r') continue;
else break;
}
*pmem++ = s*val;
if( pmem > &mem0[MEMSIZE] ) error( "out of space" );
return( c );
}