1
0
forked from bonsai/harakit

mm(1), mm.1: bring source in line with documentation

This commit is contained in:
dtb 2024-02-26 09:11:47 -07:00
parent d74bc715cf
commit 135bf2a8eb
Signed by untrusted user: trinity
GPG Key ID: 31FF85CCB6DC7641
2 changed files with 50 additions and 44 deletions

View File

@ -132,6 +132,10 @@ int main(int argc, char *argv[]){
k = 0;
if(argc > 0)
program_name = argv[0];
if(argc > 1)
while((c = getopt(argc, argv, "aehi:no:u")) != -1)
switch(c){
case 'a': /* "rb+" -> "ab" */
@ -202,6 +206,8 @@ int main(int argc, char *argv[]){
if(putc(c, files[1].files[j]) == EOF){
/* notebook's full */
retval = EX_IOERR;
fprintf(stderr, "%s: %s: %s\n",
program_name, files[1].names[j], strerror(errno));
if(fclose(files[1].files[j]) == EOF)
fprintf(stderr, "%s: %s: %s\n",
program_name, files[1].names[j], strerror(errno));