BDS C
1 program
Added 2026-03-12T12:18:10Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Brain-Damaged Software C, BD Software C
Provenance: commit c49b962959 · authored 2026-03-12T13:19:14+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Word and Character Count (wc)
Provenance: commit c49b962959 · authored 2026-03-12T13:19:14+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
/*
* BDS C: word and character count (wc)
* Classic CP/M utility in BDS C style (K&R, pre-ANSI)
*/
#include "bdscio.h"
main(argc, argv)
int argc;
char *argv[];
{
int c, words, chars, lines;
int inword;
words = 0;
chars = 0;
lines = 0;
inword = 0;
while ((c = getchar()) != EOF) {
chars++;
if (c == '\n')
lines++;
if (c == ' ' || c == '\t' || c == '\n') {
inword = 0;
} else if (!inword) {
inword = 1;
words++;
}
}
printf("lines: %d words: %d chars: %d\n", lines, words, chars);
}