diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-08 00:57:46 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-08 00:57:46 -0800 |
| commit | 1bdcca28e1ff6a3799b383087d06296bcbd14b6e (patch) | |
| tree | 78c8307a6d9a3d00dfaf4bc1e125f9ac00a19fc0 /bp.c | |
| parent | fc5ee8fcfced5893c019e2363e4a82e89625ba3c (diff) | |
Added some todos
Diffstat (limited to 'bp.c')
| -rw-r--r-- | bp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -165,6 +165,8 @@ int main(int argc, char *argv[]) } else if (streq(argv[i], "--list-files")) { flags |= BP_LISTFILES; } else if (FLAG("--replace") || FLAG("-r")) { + // TODO: spoof file as sprintf("pattern => '%s'", flag) + // except that would require handling edge cases like quotation marks etc. file_t *pat_file = spoof_file("<pattern>", "pattern"); vm_op_t *patref = bp_pattern(pat_file, pat_file->contents); file_t *replace_file = spoof_file("<replace argument>", flag); @@ -236,6 +238,7 @@ int main(int argc, char *argv[]) } } else if (argv[i][0] != '-') { if (npatterns > 0) break; + // TODO: spoof file with quotation marks for better debugging file_t *arg_file = spoof_file("<pattern argument>", argv[i]); vm_op_t *p = bp_stringpattern(arg_file, arg_file->contents); check(p, "Pattern failed to compile: %s", argv[i]); |
