~canonical-scott/grepmap/trunk

Viewing all changes in revision 23.

  • Committer: Scott James Remnant
  • Date: 2005-09-29 03:10:21 UTC
  • Revision ID: scott@netsplit.com-20050929031021-6b3c52391841a21f
* src/util.c (parse_array): Taken from inputmap.c and turned into
a function we can use anywhere; removed the pos argument and
logic to move beyond the end of the array, changed array_sz to
array_len and made it the number of elements not the sizeof.
(match_array): Also taken from input.c with array_sz changed to
array_len.
* src/inputmap.c (_parse_array, _match_array): Remove old static
function definitions from this file.
(inputmap_modules): Adjust to use parse_array, match_array and
parse_line functions from util.c, remember array lengths using
an enum. 
* src/ieee1394map.c (ieee1394map_modules): Update to use new
parse_line() function so we gain the same flexibility benefit.
* src/pcimap.c (pcimap_modules): Update to use parse_line().
* src/usbmap.c (usbmap_modules): Update to use parse_line().
* tests/ieee1394map.at (ieee1394map works without 0x prefixes):
Add test case for more liberal file parsing.
* tests/inputmap.at (inputmap works without 0x prefixes): New test.
* tests/pcimap.at (pcimap works without 0x prefixes): New test.
* tests/usbmap.at (usbmap works without 0x prefixes): New test.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: