str(1) manpage

This commit is contained in:
2022-07-04 22:22:17 -04:00
parent 5048212260
commit b3b27ceff1
3 changed files with 37 additions and 27 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
#include <string.h> /* strcmp(3) */
#include <sysexits.h>
#include <unistd.h> /* write(2) */
#include "libio.h" /* fdputs(3) */
#include "libio.h" /* fdprint(3) */
#include "usefulmacros.h"
static char *program_name = "str";
@@ -32,7 +32,7 @@ int main(int argc, char *argv[]){
if(argc < 3){
error: write(2, "Usage: ", 7);
fdputs(2, argv[0] == NULL ? program_name : argv[0]);
fdprint(2, argv[0] == NULL ? program_name : argv[0]);
write(2, " [type] [string...]\n", 20);
return EX_USAGE;
}