C
Chris M. Thomasson
Here is a link to some fairly crude example code:
http://clc.pastebin.com/f4b9f841c
Say I want to tokenize all the words in a file, the command like would look
like:
program.exe " \n" file.txt
Say I want to tokenize for all the tabs, newlines, and commas:
program.exe "\t\n," file.txt
Say I want to tokenize fields based on ";" and I want to use `stdin':
program.exe ";" file.txt
Anyway, I was wondering if anyone could provide any suggestions or notice
any undefended behavior and/or buffer overruns in the code. One suggestion I
will make: I think I should provide a way to shrink the dynamic buffer; I
don't think it would be all that difficult... I also should probably make
use of `errno' to report specific error conditions.
Please, be gentle!
;^)
http://clc.pastebin.com/f4b9f841c
Say I want to tokenize all the words in a file, the command like would look
like:
program.exe " \n" file.txt
Say I want to tokenize for all the tabs, newlines, and commas:
program.exe "\t\n," file.txt
Say I want to tokenize fields based on ";" and I want to use `stdin':
program.exe ";" file.txt
Anyway, I was wondering if anyone could provide any suggestions or notice
any undefended behavior and/or buffer overruns in the code. One suggestion I
will make: I think I should provide a way to shrink the dynamic buffer; I
don't think it would be all that difficult... I also should probably make
use of `errno' to report specific error conditions.
Please, be gentle!
;^)