Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Get hold of portable property. -- Charles Dickens, "Great Expectations"


devel / comp.os.cpm / Re: Linux utility to calculate CP/M CRC checksums

SubjectAuthor
* Re: Linux utility to calculate CP/M CRC checksumsJonathan Chapman
`- Re: Linux utility to calculate CP/M CRC checksumsАндрей Никитин

1
Re: Linux utility to calculate CP/M CRC checksums

<9b649320-9502-451b-a878-bc57fe377c35n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=2572&group=comp.os.cpm#2572

 copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:f612:: with SMTP id y18mr10020770qkj.436.1622319746058;
Sat, 29 May 2021 13:22:26 -0700 (PDT)
X-Received: by 2002:a9d:7095:: with SMTP id l21mr11899795otj.213.1622319745854;
Sat, 29 May 2021 13:22:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sat, 29 May 2021 13:22:25 -0700 (PDT)
In-Reply-To: <rmdld3$1frs$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:470:1f07:b75:2b0f:c672:f588:c431;
posting-account=O7BDowoAAAA5PZmyARRCE65rZ29eKW8r
NNTP-Posting-Host: 2001:470:1f07:b75:2b0f:c672:f588:c431
References: <0ef1c14d-9784-49ac-85cc-c147d5a0b96c@googlegroups.com>
<r8jnac$5eo$1@gioia.aioe.org> <bff4dca3-4cc5-4657-9903-50ad9d704439@googlegroups.com>
<gyEdH.22328$mP7.7296@usenetxs.com> <rl7i0s$au4$1@gioia.aioe.org>
<rl7iqs$ost$1@gioia.aioe.org> <2402011d-fba9-44c1-b890-d1fea8fa8444o@googlegroups.com>
<rlh54g$2vq$1@gioia.aioe.org> <rmdld3$1frs$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9b649320-9502-451b-a878-bc57fe377c35n@googlegroups.com>
Subject: Re: Linux utility to calculate CP/M CRC checksums
From: chapm...@gmail.com (Jonathan Chapman)
Injection-Date: Sat, 29 May 2021 20:22:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jonathan Chapman - Sat, 29 May 2021 20:22 UTC

Found this thread while working on a copy of crck.c from the UNIX C User's Group archives, I've uploaded my work to GitHub:

https://github.com/glitchwrks/crck

Repository includes the original files, plus patches to a) fix the segfault (I see someone already did the work for that here), and b) fix all the warnings GCC was throwing. I also did up a Makefile and reformatted the manpage. There's a Slackbuild for it too, but I can't upload it right now since they're getting ready for Slackware 15.0.

Re: Linux utility to calculate CP/M CRC checksums

<29f255e8-d5d9-41da-9343-1f323ede701cn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=2576&group=comp.os.cpm#2576

 copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:7306:: with SMTP id o6mr18274676qkc.38.1622482790195;
Mon, 31 May 2021 10:39:50 -0700 (PDT)
X-Received: by 2002:aca:d417:: with SMTP id l23mr14925195oig.97.1622482789987;
Mon, 31 May 2021 10:39:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 31 May 2021 10:39:49 -0700 (PDT)
In-Reply-To: <9b649320-9502-451b-a878-bc57fe377c35n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.37.209.254; posting-account=g8ksUwoAAAC0mgCsQ1LJvKj1k2HoKsbw
NNTP-Posting-Host: 77.37.209.254
References: <0ef1c14d-9784-49ac-85cc-c147d5a0b96c@googlegroups.com>
<r8jnac$5eo$1@gioia.aioe.org> <bff4dca3-4cc5-4657-9903-50ad9d704439@googlegroups.com>
<gyEdH.22328$mP7.7296@usenetxs.com> <rl7i0s$au4$1@gioia.aioe.org>
<rl7iqs$ost$1@gioia.aioe.org> <2402011d-fba9-44c1-b890-d1fea8fa8444o@googlegroups.com>
<rlh54g$2vq$1@gioia.aioe.org> <rmdld3$1frs$1@gioia.aioe.org> <9b649320-9502-451b-a878-bc57fe377c35n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <29f255e8-d5d9-41da-9343-1f323ede701cn@googlegroups.com>
Subject: Re: Linux utility to calculate CP/M CRC checksums
From: nikitinp...@gmail.com (Андрей Никитин)
Injection-Date: Mon, 31 May 2021 17:39:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Андрей Ник - Mon, 31 May 2021 17:39 UTC

суббота, 29 мая 2021 г. в 23:22:26 UTC+3, Jonathan Chapman:
> Found this thread while working on a copy of crck.c from the UNIX C User's Group archives, I've uploaded my work to GitHub:
>
> https://github.com/glitchwrks/crck
>
> Repository includes the original files, plus patches to a) fix the segfault (I see someone already did the work for that here), and b) fix all the warnings GCC was throwing. I also did up a Makefile and reformatted the manpage. There's a Slackbuild for it too, but I can't upload it right now since they're getting ready for Slackware 15.0.

I suggest making the code of the main program more elegant:
1. Get rid of the jump to the label by moving the code behind it into the switch statement.
2. The operator exit (0) repeated in two branches; place behind it.

This does not affect the logic of the program, but it looks more beautiful.

The main program code will be as follows:

int main(argc, argv)
int argc;
char **argv;
{ int err = 0;

if (argc > 1 && (++argv)[0][0] == '-') {
switch (argv[0][1]) {
case 't':
++tflag;
break;
case 'c':
++cflag;
break;
case 'u':
++uflag;
break;
case 'i':
++iflag; ++cflag;
break;
default:
fprintf(stderr, "Usage: crck [-t|c|u|i] [filename ... ]\n");
exit(-100);
}
--argc; ++argv;
}
else /* for right now, "Unix mode" is the default */
++uflag;

if (isatty(2)) { /* print header if not in a pipe */
printf("CRCK program for Unix\n");
printf("Version %1d.%1d\n\n", VERSION/10, VERSION%10);
if (iflag) printf("ITS mode selected\n");
if (tflag) printf("CP/M text mode selected\n");
if (cflag) printf("CP/M \".COM\" mode selected\n");
if (uflag) printf("Unix file mode selected\n");
putchar('\n');
}

if (argc == 1 ) { /* we're just taking stdin from somewhere */
docrck("stdin");
}
else { /* we're doing a named file or a list of same */
for (; --argc; ++argv) {
err = 0;
if (freopen(*argv, "r", stdin) == NULL) {
perror(*argv);
++err;
}
if (!err)
docrck(*argv);
}
}
exit(0);
}

With respect
Andrey Nikitin

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor