Subversion Repositories Kolibri OS

Rev

Rev 5222 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5222 Rev 6324
Line 1... Line 1...
1
/* This is the Assembler Pre-Processor
1
/* This is the Assembler Pre-Processor
2
   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-
 
3
   1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2012
-
 
4
   Free Software Foundation, Inc.
2
   Copyright (C) 1987-2015 Free Software Foundation, Inc.
Line 5... Line 3...
5
 
3
 
Line 6... Line 4...
6
   This file is part of GAS, the GNU Assembler.
4
   This file is part of GAS, the GNU Assembler.
7
 
5
 
Line 158... Line 156...
158
    lex[(unsigned char) *p] = LEX_IS_COMMENT_START;
156
    lex[(unsigned char) *p] = LEX_IS_COMMENT_START;
Line 159... Line 157...
159
 
157
 
160
  for (p = line_comment_chars; *p; p++)
158
  for (p = line_comment_chars; *p; p++)
Line -... Line 159...
-
 
159
    lex[(unsigned char) *p] = LEX_IS_LINE_COMMENT_START;
-
 
160
 
-
 
161
#ifndef tc_line_separator_chars
161
    lex[(unsigned char) *p] = LEX_IS_LINE_COMMENT_START;
162
#define tc_line_separator_chars line_separator_chars
162
 
163
#endif
Line 163... Line 164...
163
  for (p = line_separator_chars; *p; p++)
164
  for (p = tc_line_separator_chars; *p; p++)
164
    lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
165
    lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
165
 
166
 
Line 244... Line 245...
244
};
245
};
Line 245... Line 246...
245
 
246
 
246
char *
247
char *
247
app_push (void)
248
app_push (void)
248
{
249
{
Line 249... Line 250...
249
  register struct app_save *saved;
250
  struct app_save *saved;
250
 
251
 
251
  saved = (struct app_save *) xmalloc (sizeof (*saved));
252
  saved = (struct app_save *) xmalloc (sizeof (*saved));
252
  saved->state = state;
253
  saved->state = state;
Line 281... Line 282...
281
}
282
}
Line 282... Line 283...
282
 
283
 
283
void
284
void
284
app_pop (char *arg)
285
app_pop (char *arg)
285
{
286
{
Line 286... Line 287...
286
  register struct app_save *saved = (struct app_save *) arg;
287
  struct app_save *saved = (struct app_save *) arg;
287
 
288
 
288
  /* There is no do_scrub_end ().  */
289
  /* There is no do_scrub_end ().  */
289
  state = saved->state;
290
  state = saved->state;
Line 357... Line 358...
357
  char *to = tostart;
358
  char *to = tostart;
358
  char *toend = tostart + tolen;
359
  char *toend = tostart + tolen;
359
  char *from;
360
  char *from;
360
  char *fromend;
361
  char *fromend;
361
  size_t fromlen;
362
  size_t fromlen;
362
  register int ch, ch2 = 0;
363
  int ch, ch2 = 0;
363
  /* Character that started the string we're working on.  */
364
  /* Character that started the string we're working on.  */
364
  static char quotechar;
365
  static char quotechar;
Line 365... Line 366...
365
 
366
 
366
  /*State 0: beginning of normal line
367
  /*State 0: beginning of normal line
Line 1215... Line 1216...
1215
		{
1216
		{
1216
		  /* Not a cpp line.  */
1217
		  /* Not a cpp line.  */
1217
		  while (ch != EOF && !IS_NEWLINE (ch))
1218
		  while (ch != EOF && !IS_NEWLINE (ch))
1218
		    ch = GET ();
1219
		    ch = GET ();
1219
		  if (ch == EOF)
1220
		  if (ch == EOF)
-
 
1221
		    {
1220
		    as_warn (_("end of file in comment; newline inserted"));
1222
		    as_warn (_("end of file in comment; newline inserted"));
1221
		  state = 0;
-
 
1222
		  PUT ('\n');
1223
		      PUT ('\n');
-
 
1224
		    }
-
 
1225
		  else /* IS_NEWLINE (ch) */
-
 
1226
		    {
-
 
1227
		      /* To process non-zero add_newlines.  */
-
 
1228
		      UNGET (ch);
-
 
1229
		    }
-
 
1230
		  state = 0;
1223
		  break;
1231
		  break;
1224
		}
1232
		}
1225
	      /* Looks like `# 123 "filename"' from cpp.  */
1233
	      /* Looks like `# 123 "filename"' from cpp.  */
1226
	      UNGET (ch);
1234
	      UNGET (ch);
1227
	      old_state = 4;
1235
	      old_state = 4;