/* itbl-ops.c
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include <stdlib.h>
#include <string.h>
#include "itbl-ops.h"
-#include "itbl-parse.h"
+#include <itbl-parse.h>
/* #define DEBUG */
{
extern FILE *yyin;
extern int yyparse (void);
- yyin = fopen (insntbl, "r");
+
+ yyin = fopen (insntbl, FOPEN_RT);
if (yyin == 0)
{
printf ("Can't open processor instruction specification file \"%s\"\n",
insntbl);
return 1;
}
- else
- {
- while (yyparse ());
- }
+
+ while (yyparse ())
+ ;
+
fclose (yyin);
itbl_have_entries = 1;
return 0;
itbl_assemble (char *name, char *s)
{
unsigned long opcode;
- struct itbl_entry *e;
+ struct itbl_entry *e = NULL;
struct itbl_field *f;
char *n;
int processor;
if (!name || !*name)
- return 0; /* error! must have a opcode name/expr */
+ return 0; /* error! must have an opcode name/expr */
/* find entry in list of instructions for all processors */
for (processor = 0; processor < e_nprocs; processor++)