aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2009-10-14 10:54:27 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2009-10-14 10:54:27 +0000
commitd05c651b27358c7d6d0d59e8b46f8b0c68ae6369 (patch)
tree3907895cfd97d132b8e5560449b83ab305521542 /ld/ldlex.l
parent7dff20279654e6dd571705f3fc9bad655d1d1dcd (diff)
downloadgdb-d05c651b27358c7d6d0d59e8b46f8b0c68ae6369.zip
gdb-d05c651b27358c7d6d0d59e8b46f8b0c68ae6369.tar.gz
gdb-d05c651b27358c7d6d0d59e8b46f8b0c68ae6369.tar.bz2
* ldlex.l (yy_input): Remove second argument and return the value
instead. (YY_INPUT): Adjust.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l17
1 files changed, 9 insertions, 8 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index 25b4c73..ef09eb0 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -57,7 +57,7 @@ const char *lex_string = NULL;
Otherwise, stack elements 0 through `include_stack_ptr - 1' are valid. */
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
+#define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
#define YY_NO_UNPUT
@@ -68,7 +68,7 @@ static unsigned int lineno_stack[MAX_INCLUDE_DEPTH];
static unsigned int include_stack_ptr = 0;
static int vers_node_nesting = 0;
-static void yy_input (char *, int *, int);
+static int yy_input (char *, int);
static void comment (void);
static void lex_warn_invalid (char *where, char *what);
@@ -608,22 +608,23 @@ ldlex_popstate (void)
}
-/* Place up to MAX_SIZE characters in BUF and return in *RESULT
+/* Place up to MAX_SIZE characters in BUF and return
either the number of characters read, or 0 to indicate EOF. */
-static void
-yy_input (char *buf, int *result, int max_size)
+static int
+yy_input (char *buf, int max_size)
{
- *result = 0;
+ int result = 0;
if (YY_CURRENT_BUFFER->yy_input_file)
{
if (yyin)
{
- *result = fread (buf, 1, max_size, yyin);
- if (*result < max_size && ferror (yyin))
+ result = fread (buf, 1, max_size, yyin);
+ if (result < max_size && ferror (yyin))
einfo ("%F%P: read in flex scanner failed\n");
}
}
+ return result;
}
/* Eat the rest of a C-style comment. */