summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/scan.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-08-26 09:30:50 +0000
committerobrien <obrien@FreeBSD.org>1999-08-26 09:30:50 +0000
commit0bedf4fb30066e5e1d4342a1d3914dae7d37cba7 (patch)
tree68d8110b41afd0ebbf39167b1a4918eea667a7c5 /contrib/gcc/scan.c
parentd4db5fb866b7ad5216abd5047774a3973b9901a9 (diff)
downloadFreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.zip
FreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.tar.gz
Virgin import of gcc from EGCS 1.1.2
Diffstat (limited to 'contrib/gcc/scan.c')
-rw-r--r--contrib/gcc/scan.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/gcc/scan.c b/contrib/gcc/scan.c
index 1086c38..63e2470 100644
--- a/contrib/gcc/scan.c
+++ b/contrib/gcc/scan.c
@@ -15,9 +15,9 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "scan.h"
#include "hconfig.h"
-#include <ctype.h>
+#include "system.h"
+#include "scan.h"
int lineno = 1;
int source_lineno = 1;
@@ -49,7 +49,7 @@ sstring_append (dst, src)
sstring *src;
{
register char *d, *s;
- register count = SSTRING_LENGTH(src);
+ register int count = SSTRING_LENGTH(src);
MAKE_SSTRING_SPACE(dst, count + 1);
d = dst->ptr;
s = src->base;
@@ -65,13 +65,13 @@ scan_ident (fp, s, c)
int c;
{
s->ptr = s->base;
- if (isalpha(c) || c == '_')
+ if (ISALPHA(c) || c == '_')
{
for (;;)
{
SSTRING_PUT(s, c);
c = getc (fp);
- if (c == EOF || !(isalnum(c) || c == '_'))
+ if (c == EOF || !(ISALNUM(c) || c == '_'))
break;
}
}
@@ -84,6 +84,7 @@ int
scan_string (fp, s, init)
register FILE *fp;
register sstring *s;
+ int init;
{
int c;
for (;;)
@@ -111,7 +112,7 @@ scan_string (fp, s, init)
return c;
}
-/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */
+/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */
int
skip_spaces (fp, c)
@@ -209,18 +210,18 @@ get_token (fp, s)
}
if (c == EOF)
return EOF;
- if (isdigit (c))
+ if (ISDIGIT (c))
{
do
{
SSTRING_PUT(s, c);
c = getc (fp);
- } while (c != EOF && isdigit(c));
+ } while (c != EOF && ISDIGIT(c));
ungetc (c, fp);
c = INT_TOKEN;
goto done;
}
- if (isalpha (c) || c == '_')
+ if (ISALPHA (c) || c == '_')
{
c = scan_ident (fp, s, c);
ungetc (c, fp);
OpenPOWER on IntegriCloud