From 1bdcca28e1ff6a3799b383087d06296bcbd14b6e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 8 Jan 2021 00:57:46 -0800 Subject: Added some todos --- bp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bp.c') diff --git a/bp.c b/bp.c index 41acbcc..a9ffe01 100644 --- a/bp.c +++ b/bp.c @@ -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"); vm_op_t *patref = bp_pattern(pat_file, pat_file->contents); file_t *replace_file = spoof_file("", 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("", argv[i]); vm_op_t *p = bp_stringpattern(arg_file, arg_file->contents); check(p, "Pattern failed to compile: %s", argv[i]); -- cgit v1.2.3