Deleted Added
full compact
1/*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the

--- 9 unchanged lines hidden (view full) ---

18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie the
24 * rights to redistribute these changes.
25 *
26 * $Id$
27 */
28
29/*
30 * Author: David B. Golub, Carnegie Mellon University
31 * Date: 7/90
32 */
33/*
34 * Lexical analyzer.
35 */
36#include <ddb/db_lex.h>
37
38char db_line[120];
39char * db_lp, *db_endlp;
40
41int
42db_read_line()
43{

--- 29 unchanged lines hidden (view full) ---

73 c = -1;
74 else
75 c = *db_lp++;
76 return (c);
77}
78
79void
80db_unread_char(c)
81{
82 db_look_char = c;
83}
84
85int db_look_token = 0;
86
87void
88db_unread_token(t)

--- 38 unchanged lines hidden (view full) ---

127 while (c <= ' ' || c > '~') {
128 if (c == '\n' || c == -1)
129 return (tEOL);
130 c = db_read_char();
131 }
132
133 if (c >= '0' && c <= '9') {
134 /* number */
135 int r, digit;
136
137 if (c > '0')
138 r = db_radix;
139 else {
140 c = db_read_char();
141 if (c == 'O' || c == 'o')
142 r = 8;
143 else if (c == 'T' || c == 't')

--- 132 unchanged lines hidden ---