diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-03 18:36:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-03 18:36:00 -0700 |
commit | 2c36119df5a9bf9ad04f665961721fdeb7ca7551 (patch) | |
tree | 295dc51738bf051de50b581c7ccb5c5fe220e146 /example.c | |
parent | 29d1ef3aac738226ede774080852bd3191804235 (diff) | |
download | sparse-2c36119df5a9bf9ad04f665961721fdeb7ca7551.tar.gz |
Update the calling interface to "sparse()".
Start off with
sparse_initialize(argc, argv);
which will return the number of filenames found. You can then use that,
or just check if *argv is NULL in a loop like
while (*argv)
list = sparse(argv);
where you get the declaration list for each file in turn.
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1587,7 +1587,7 @@ static void fill_output(struct bb_state *state, pseudo_t pseudo, struct storage default: if (out == in->storage) break; - if (out->type == in->storage->type == out->regno == in->storage->regno) + if ((out->type == in->storage->type) && (out->regno == in->storage->regno)) break; output_insn(state, "movl %s,%s", show_memop(in->storage), show_memop(out)); break; @@ -1958,6 +1958,9 @@ static int compile(struct symbol_list *list) int main(int argc, char **argv) { - return compile(sparse(argc, argv)); + sparse_initialize(argc, argv); + while (*argv) + compile(sparse(argv)); + return 0; } |