more cleanup
This commit is contained in:
parent
0398d9ca94
commit
2501cd52d8
28
mm/mm.c
28
mm/mm.c
@ -20,7 +20,7 @@
|
|||||||
#include <signal.h> /* signal(2), SIG_ERR, SIG_IGN, SIGINT */
|
#include <signal.h> /* signal(2), SIG_ERR, SIG_IGN, SIGINT */
|
||||||
#include <stdio.h> /* fclose(3), fopen(3), fprintf(3), getc(3), putc(3),
|
#include <stdio.h> /* fclose(3), fopen(3), fprintf(3), getc(3), putc(3),
|
||||||
* setvbuf(3), size_t, _IONBF, NULL */
|
* setvbuf(3), size_t, _IONBF, NULL */
|
||||||
#include <stdlib.h> /* free(3), malloc(3), realloc(3) */
|
#include <stdlib.h> /* free(3), realloc(3) */
|
||||||
#include <string.h> /* strerror(3) */
|
#include <string.h> /* strerror(3) */
|
||||||
#include <unistd.h> /* getopt(3) */
|
#include <unistd.h> /* getopt(3) */
|
||||||
#if !defined EX_OSERR || !defined EX_USAGE
|
#if !defined EX_OSERR || !defined EX_USAGE
|
||||||
@ -55,11 +55,6 @@ static char *stderr_name = "<stderr>";
|
|||||||
static char *(fmode[]) = { (char []){"rb"}, (char []){"rb+"} };
|
static char *(fmode[]) = { (char []){"rb"}, (char []){"rb+"} };
|
||||||
static char *wharsh = "wb";
|
static char *wharsh = "wb";
|
||||||
|
|
||||||
/* Opens the file at the path p and puts it in the files struct, returning NULL
|
|
||||||
* if either the opening or the placement of the open FILE pointer fail. */
|
|
||||||
#define Files_open(files, p) \
|
|
||||||
Files_append((files), fopen((p), (files)->mode), (p))
|
|
||||||
|
|
||||||
/* Adds the open FILE pointer for the file at the path s to the files struct,
|
/* Adds the open FILE pointer for the file at the path s to the files struct,
|
||||||
* returning the FILE if successful and NULL if not, allocating more memory in
|
* returning the FILE if successful and NULL if not, allocating more memory in
|
||||||
* the files buffers as needed. */
|
* the files buffers as needed. */
|
||||||