dtb trinity
trinity commented on pull request bonsai/harakit#142 2024-07-29 11:47:38 -06:00
Formatting

I can get behind merging this.

trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 11:30:53 -06:00
7e347bebdf mm(1): interpret retvals
trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 11:14:54 -06:00
a7b27f0d6a strcmp(1): interpret all retvals
trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 11:14:04 -06:00
c554b96722 swab(1): fix type errors
7b930363bf npc(1): fix syntax errors
Compare 2 commits »
trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 11:10:23 -06:00
5545846c92 dj(1): fix fprintio signature
162c6411b3 mm(1): remove terminate macro
Compare 2 commits »
trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 11:04:06 -06:00
2e172d93e8 dj(1): interpret all retvals
trinity pushed to dj-formatting at bonsai/harakit 2024-07-29 10:54:23 -06:00
549fa98bdb npc(1): interpret all retvals
trinity commented on pull request bonsai/harakit#142 2024-07-28 23:46:33 -06:00
Formatting

This should be moved to the if (argc > 0) block.

trinity pushed to dj-formatting at bonsai/harakit 2024-07-28 21:26:25 -06:00
8bb57bf2e4 Merge branch 'dj-formatting' of git.tebibyte.media:bonsai/harakit into dj-formatting
ca6148e11f intcmp(1): tweak comment
Compare 2 commits »
trinity commented on pull request bonsai/harakit#142 2024-07-28 20:30:45 -06:00
Formatting

Got it.

trinity commented on pull request bonsai/harakit#142 2024-07-28 20:30:18 -06:00
Formatting

Fair enough.

trinity commented on pull request bonsai/harakit#142 2024-07-28 07:27:58 -06:00
Formatting

Iterating through characters in arguments looks something like:

for(size_t i = optind; i < argc; ++i) {
    for(size_t j = 0; argv[i][j] != '\0'; ++j) { // two dereferences (p[i][j])
  
trinity commented on pull request bonsai/harakit#142 2024-07-28 07:25:12 -06:00
Formatting

Yes, not setting an intermediate variable but relying on argv[0] elsewhere, only falling back to program_name here.

So:

if (argc < 3) { return usage(argv[0] == NULL ? program_name
trinity commented on pull request bonsai/harakit#142 2024-07-28 07:23:18 -06:00
Formatting

Could you match _ instead of Err(_)?

trinity pushed to peek at bonsai/harakit 2024-07-27 18:51:15 -06:00
b68be7ff62 peek(1): fix ioerr typos
trinity pushed to peek at bonsai/harakit 2024-07-27 18:47:02 -06:00
a217c4f631 Merge branch 'main' into peek
e90d25e30f Merge branch 'strcmp'
71f372d2c2 Merge branch 'intcmp'
27ff64dffa intcmp(1): add comments
becb3bac4e strcmp(1): code clarification
Compare 115 commits »
trinity commented on pull request bonsai/harakit#142 2024-07-27 18:39:31 -06:00
Formatting

@trinity: Are you cool with this being merged without .clang-format?

Yeah, we can do it later down the line.

trinity commented on pull request bonsai/harakit#142 2024-07-27 18:38:09 -06:00
Formatting

This says the code is outdated but as of commenting the relevant snippet is not.

trinity pushed to dj-formatting at bonsai/harakit 2024-07-27 18:35:09 -06:00
970b25dee2 str(1): fix brackets
trinity pushed to dj-formatting at bonsai/harakit 2024-07-27 18:32:11 -06:00
5d48114083 dj(1), intcmp(1), mm(1), npc(1), scrut(1), str(1): make usage function consistent
429d064209 mm(1): fix argv use
c5c0e543e4 mm(1): remove useless extern errno
Compare 3 commits »