mm(1), mm.1: bring source in line with documentation
This commit is contained in:
parent
d74bc715cf
commit
135bf2a8eb
6
src/mm.c
6
src/mm.c
|
@ -132,6 +132,10 @@ int main(int argc, char *argv[]){
|
||||||
|
|
||||||
k = 0;
|
k = 0;
|
||||||
|
|
||||||
|
if(argc > 0)
|
||||||
|
program_name = argv[0];
|
||||||
|
|
||||||
|
if(argc > 1)
|
||||||
while((c = getopt(argc, argv, "aehi:no:u")) != -1)
|
while((c = getopt(argc, argv, "aehi:no:u")) != -1)
|
||||||
switch(c){
|
switch(c){
|
||||||
case 'a': /* "rb+" -> "ab" */
|
case 'a': /* "rb+" -> "ab" */
|
||||||
|
@ -202,6 +206,8 @@ int main(int argc, char *argv[]){
|
||||||
if(putc(c, files[1].files[j]) == EOF){
|
if(putc(c, files[1].files[j]) == EOF){
|
||||||
/* notebook's full */
|
/* notebook's full */
|
||||||
retval = EX_IOERR;
|
retval = EX_IOERR;
|
||||||
|
fprintf(stderr, "%s: %s: %s\n",
|
||||||
|
program_name, files[1].names[j], strerror(errno));
|
||||||
if(fclose(files[1].files[j]) == EOF)
|
if(fclose(files[1].files[j]) == EOF)
|
||||||
fprintf(stderr, "%s: %s: %s\n",
|
fprintf(stderr, "%s: %s: %s\n",
|
||||||
program_name, files[1].names[j], strerror(errno));
|
program_name, files[1].names[j], strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user