move back to c99
This commit is contained in:
parent
317f7bf357
commit
5a0ec4ed37
15 changed files with 8 additions and 40 deletions
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ CC = gcc
|
|||
|
||||
INCFLAGS = -Isrc
|
||||
|
||||
CCFLAGS = -std=gnu99 -Wall -Wextra -pedantic -O2
|
||||
CCFLAGS = -std=c99 -Wall -Wextra -pedantic -O2 -D_DEFAULT_SOURCE
|
||||
CCFLAGS += $(INCFLAGS)
|
||||
|
||||
LDFLAGS += $(INCFLAGS)
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define ARGUMENTS int argc, char** argv
|
||||
#define NEXT_ARGS argc - 1, &argv[1]
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
struct Flags {
|
||||
bool number_lines;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "../command.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static void help() {
|
||||
printf("Usage: dd [if=FILE] [of=FILE] [bs=N] [count=N]\n\n");
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static void print_with_escape_codes(const char* str) {
|
||||
|
||||
size_t index = 0;
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#include "../command.h"
|
||||
#include "../util//regex.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define INPUT_LEN 1024
|
||||
|
||||
static char** lines = NULL;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
|
||||
COMMAND_EMPTY(groups) {
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
struct Flags {
|
||||
int count;
|
||||
bool lines;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
COMMAND_EMPTY(user_id) {
|
||||
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <ftw.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "../command.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static long cast_long(const char* arg) {
|
||||
char* end;
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
struct Flags {
|
||||
bool lines;
|
||||
int count;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static void help() {
|
||||
printf("Usage: tee [-ai] [FILE]...\n\n");
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
struct Flags {
|
||||
bool newlines;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#include "../command.h"
|
||||
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void help() {
|
||||
printf("Usage: whoami\n\n");
|
||||
|
|
Loading…
Reference in a new issue