forked from jsardo/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmisc.h
More file actions
35 lines (30 loc) · 724 Bytes
/
misc.h
File metadata and controls
35 lines (30 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MISC_H
#define MISC_H
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
#include <stdbool.h>
#define NAME_MAX 100
#define BUFSIZE 1024
#define SCREEN_HEIGHT 25
int _argc;
int removedir(const char *name, int rflag);
char *strdup(const char *s);
int is_dir(const char *file);
int create_file(const char *name);
void error(char *fmt, ...);
int open_file(const char *name, int flag);
void usage(void);
int get_argc(char *s);
char **get_args(char *s, int index);
char *skip_flags(char *s);
char *get_flags(char *buf);
bool prompt(char *fmt, ...);
#endif