MK_CMDS(1)

πŸ’– MK_CMDS πŸ’–

okay bestie, gather round, because we're talking about mk_cmds β€” the error table compiler from the General Commands Manual. yes it's a whole thing and yes you're gonna slay it πŸ’…


✨ SYNOPSIS ✨

mk_cmds file

like that's it. one little file argument and we're off πŸ¦‹


🌸 DESCRIPTION 🌸

so what does mk_cmds actually do, you ask? it takes a table that lists command names plus their associated help messages, and it turns that whole vibe into a C source file that's suitable for use with the ss(3) library. it's giving compiler, it's giving translator, it's giving main character energy ✨

lowkey important: the source file name must end with a suffix of .ct. no .ct, no deal, bestie πŸ™ˆ

the file is made up of a declaration that supplies the name of the command table:

command_table name

...and then it's followed by entries that look exactly like this:

[ request | unimplemented ] name, " string "[, abbrev]...;

and then a final

end

to indicate the end of the table. periodt. πŸ‘‘

so after all that, a C source file is generated, and you should compile and link it with the object files use the ss library. (that's literally what the page says, i'm not making it up 🫢)

also!! a # in the source file is treated as a comment character, and all the remaining text to the end of the source line gets ignored. so go off with your comments, they will not be perceived πŸ’€


😭 BUGS 😭

ok so here's the tea and it's a little messy. since the original mk_cmds uses a very simple parser based on yacc(1), and this current version of mk_cmds uses an awk/sed combination of scripts, its error recovery leaves much to be desired. not me exposing the whole thing but fr fr, that's what it says 🌈


πŸŽ€ SEE ALSO πŸŽ€

  • ss (3) β€” go read it, bestie, iykyk πŸ“–

and that's the whole page, diva. this absolute icon came to you courtesy of E2FSPROGS, dated 2003, and no cap it's still out here doing its thing. mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from