old_argv = *pargv;
/* Initialize a new argv that contains no options. */
- new_argv = XNEWVEC (char *, old_argc + 1);
+ new_argv = notes_alloc (sizeof (char *) * (old_argc + 1));
new_argv[0] = old_argv[0];
new_argc = 1;
new_argv[new_argc] = NULL;
case OPTION_AL:
listing |= LISTING_LISTING;
if (optarg)
- listing_filename = xstrdup (optarg);
+ listing_filename = notes_strdup (optarg);
break;
case OPTION_ALTERNATE:
listing |= LISTING_SYMBOLS;
break;
case '=':
- listing_filename = xstrdup (optarg + 1);
+ listing_filename = notes_strdup (optarg + 1);
optarg += strlen (listing_filename);
break;
default:
case 'I':
{ /* Include file directory. */
- char *temp = xstrdup (optarg);
+ char *temp = notes_strdup (optarg);
add_include_dir (temp);
break;
}
case 'o':
- out_file_name = xstrdup (optarg);
+ out_file_name = notes_strdup (optarg);
break;
case 'w':
if (!saw_a_file)
read_a_source_file ("");
}
-\f
+
+static void
+free_notes (void)
+{
+ _obstack_free (¬es, NULL);
+}
int
main (int argc, char ** argv)
select_emulation_mode (argc, argv);
#endif
+ obstack_begin (¬es, chunksize);
+ xatexit (free_notes);
+
PROGRESS (1);
/* Call parse_args before any of the init/begin functions
so that switches like --hash-size can be honored. */
pobegin ();
obj_read_begin_hook ();
- /* Something close -- but not too close -- to a multiple of 1024.
- The debugging malloc I'm using has 24 bytes of overhead. */
- obstack_begin (¬es, chunksize);
obstack_begin (&cond_obstack, chunksize);
#ifndef tc_line_separator_chars
read_end (void)
{
poend ();
+ _obstack_free (&cond_obstack, NULL);
}
\f
#ifndef TC_ADDRESS_BYTES
for (; *obs; obs++)
_obstack_free (*obs, NULL);
_obstack_free (&frchains, NULL);
- _obstack_free (&cond_obstack, NULL);
- _obstack_free (¬es, NULL);
}
\f
static void