mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 00:27:52 +01:00
misc: run clang-format
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
extern void exit(int code);
|
||||
extern int main ();
|
||||
extern int main();
|
||||
extern void __libc_init_array();
|
||||
extern void __libc_fini_array();
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
* @(#)dirent.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _SYS_DIRENT_H_
|
||||
#define _SYS_DIRENT_H_
|
||||
#ifndef _SYS_DIRENT_H_
|
||||
#define _SYS_DIRENT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -55,47 +55,47 @@ extern "C" {
|
||||
*/
|
||||
|
||||
struct dirent {
|
||||
unsigned long d_fileno; /* file number of entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
unsigned char d_type; /* file type, see below */
|
||||
unsigned char d_namlen; /* length of string in d_name */
|
||||
char d_name[NAME_MAX + 1]; /* name must be no longer than this */
|
||||
unsigned long d_fileno; /* file number of entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
unsigned char d_type; /* file type, see below */
|
||||
unsigned char d_namlen; /* length of string in d_name */
|
||||
char d_name[NAME_MAX + 1]; /* name must be no longer than this */
|
||||
};
|
||||
|
||||
/*
|
||||
* File types
|
||||
*/
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_FIFO 1
|
||||
#define DT_CHR 2
|
||||
#define DT_DIR 4
|
||||
#define DT_BLK 6
|
||||
#define DT_REG 8
|
||||
#define DT_LNK 10
|
||||
#define DT_SOCK 12
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_FIFO 1
|
||||
#define DT_CHR 2
|
||||
#define DT_DIR 4
|
||||
#define DT_BLK 6
|
||||
#define DT_REG 8
|
||||
#define DT_LNK 10
|
||||
#define DT_SOCK 12
|
||||
|
||||
/*
|
||||
* Convert between stat structure types and directory types.
|
||||
*/
|
||||
#define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||
#define DTTOIF(dirtype) ((dirtype) << 12)
|
||||
#define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||
#define DTTOIF(dirtype) ((dirtype) << 12)
|
||||
|
||||
/*
|
||||
* The kernel defines the format of directory entries returned by
|
||||
* the getdirentries(2) system call.
|
||||
*/
|
||||
|
||||
#define d_ino d_fileno /* backward compatibility */
|
||||
#define d_ino d_fileno /* backward compatibility */
|
||||
|
||||
/* structure describing an open directory. */
|
||||
typedef struct _dirdesc {
|
||||
int dd_fd; /* file descriptor associated with directory */
|
||||
long dd_loc; /* offset in current buffer */
|
||||
long dd_size; /* amount of data returned by getdirentries */
|
||||
int dd_fd; /* file descriptor associated with directory */
|
||||
long dd_loc; /* offset in current buffer */
|
||||
long dd_size; /* amount of data returned by getdirentries */
|
||||
char *dd_buf; /* data buffer */
|
||||
int dd_len; /* size of data buffer */
|
||||
long dd_seek; /* magic cookie returned by getdirentries */
|
||||
long dd_rewind; /* magic cookie for rewinding */
|
||||
int dd_len; /* size of data buffer */
|
||||
long dd_seek; /* magic cookie returned by getdirentries */
|
||||
long dd_rewind; /* magic cookie for rewinding */
|
||||
} DIR;
|
||||
|
||||
//#define dirfd(dirp) ((dirp)->dd_fd)
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SYSCALL_EXIT_ID 0
|
||||
#define SYSCALL_EXIT_ID 0
|
||||
|
||||
#define SYSCALL_PUTCHAR_ID 1
|
||||
#define SYSCALL_SLEEP_ID 2
|
||||
#define SYSCALL_READCHAR_ID 3
|
||||
|
||||
#define SYSCALL_OPEN_ID 4
|
||||
#define SYSCALL_CLOSE_ID 5
|
||||
#define SYSCALL_OPEN_ID 4
|
||||
#define SYSCALL_CLOSE_ID 5
|
||||
|
||||
#define SYSCALL_READ_ID 6
|
||||
#define SYSCALL_WRITE_ID 7
|
||||
#define SYSCALL_LSEEK_ID 8
|
||||
#define SYSCALL_READ_ID 6
|
||||
#define SYSCALL_WRITE_ID 7
|
||||
#define SYSCALL_LSEEK_ID 8
|
||||
|
||||
#define SYSCALL_OPENDIR_ID 9
|
||||
#define SYSCALL_READDIR_ID 10
|
||||
@@ -28,16 +28,16 @@ extern "C" {
|
||||
#define SYSCALL_MKDIR_ID 12
|
||||
#define SYSCALL_UNLINK_ID 13
|
||||
|
||||
#define SYSCALL_EXECVE_ID 50
|
||||
#define SYSCALL_FORK_ID 51
|
||||
#define SYSCALL_WAITPID_ID 52
|
||||
#define SYSCALL_SBRK_ID 100
|
||||
#define SYSCALL_EXECVE_ID 50
|
||||
#define SYSCALL_FORK_ID 51
|
||||
#define SYSCALL_WAITPID_ID 52
|
||||
#define SYSCALL_SBRK_ID 100
|
||||
|
||||
#define SYSCALL_PRINT_MEM 1000
|
||||
#define SYSCALL_PRINT_TASKS 1001
|
||||
|
||||
void print_mem();
|
||||
void print_tasks();
|
||||
void print_mem();
|
||||
void print_tasks();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user