Ast@'s formatting fixes

This commit is contained in:
Ben Gras 2005-09-16 14:23:14 +00:00
parent 2e875d3ff2
commit 688910d983
6 changed files with 136 additions and 136 deletions

View file

@ -58,29 +58,29 @@
/* Values actually implemented by MINIX (Tables 2-4, 2-5, 2-6, and 2-7). */
/* Some of these old names had better be defined when not POSIX. */
#define _NO_LIMIT 100 /* arbitrary number; limit not enforced */
#define _NO_LIMIT 100 /* arbitrary number; limit not enforced */
#define NGROUPS_MAX 0 /* supplemental group IDs not available */
#define NGROUPS_MAX 0 /* supplemental group IDs not available */
#if _EM_WSIZE > 2
#define ARG_MAX 16384 /* # bytes of args + environ for exec() */
#define ARG_MAX 16384 /* # bytes of args + environ for exec() */
#else
#define ARG_MAX 4096 /* args + environ on small machines */
#define ARG_MAX 4096 /* args + environ on small machines */
#endif
#define CHILD_MAX _NO_LIMIT /* MINIX does not limit children */
#define OPEN_MAX 20 /* # open files a process may have */
#define CHILD_MAX _NO_LIMIT /* MINIX does not limit children */
#define OPEN_MAX 20 /* # open files a process may have */
#if 0 /* V1 file system */
#define LINK_MAX CHAR_MAX /* # links a file may have */
#define LINK_MAX CHAR_MAX /* # links a file may have */
#else /* V2 or better file system */
#define LINK_MAX SHRT_MAX /* # links a file may have */
#define LINK_MAX SHRT_MAX /* # links a file may have */
#endif
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX DIRSIZ /* # chars in a file name */
#define PATH_MAX 255 /* # chars in a path name */
#define PIPE_BUF 7168 /* # bytes in atomic write to a pipe */
#define STREAM_MAX 20 /* must be the same as FOPEN_MAX in stdio.h */
#define TZNAME_MAX 3 /* maximum bytes in a time zone name is 3 */
#define SSIZE_MAX 32767 /* max defined byte count for read() */
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX DIRSIZ /* # chars in a file name */
#define PATH_MAX 255 /* # chars in a path name */
#define PIPE_BUF 7168 /* # bytes in atomic write to a pipe */
#define STREAM_MAX 20 /* must be the same as FOPEN_MAX in stdio.h */
#define TZNAME_MAX 3 /* maximum bytes in a time zone name is 3 */
#define SSIZE_MAX 32767 /* max defined byte count for read() */
#endif /* _POSIX_SOURCE */

View file

@ -28,17 +28,17 @@
#define HARDWARE KERNEL /* for hardware interrupt handlers */
/* Number of tasks. Note that NR_PROCS is defined in <minix/config.h>. */
#define NR_TASKS 4
#define NR_TASKS 4
/* User-space processes, that is, device drivers, servers, and INIT. */
#define PM_PROC_NR 0 /* process manager */
#define FS_PROC_NR 1 /* file system */
#define RS_PROC_NR 2 /* reincarnation server */
#define MEM_PROC_NR 3 /* memory driver (RAM disk, null, etc.) */
#define LOG_PROC_NR 4 /* log device driver */
#define TTY_PROC_NR 5 /* terminal (TTY) driver */
#define DRVR_PROC_NR 6 /* device driver for boot medium */
#define INIT_PROC_NR 7 /* init -- goes multiuser */
#define PM_PROC_NR 0 /* process manager */
#define FS_PROC_NR 1 /* file system */
#define RS_PROC_NR 2 /* reincarnation server */
#define MEM_PROC_NR 3 /* memory driver (RAM disk, null, etc.) */
#define LOG_PROC_NR 4 /* log device driver */
#define TTY_PROC_NR 5 /* terminal (TTY) driver */
#define DRVR_PROC_NR 6 /* device driver for boot medium */
#define INIT_PROC_NR 7 /* init -- goes multiuser */
/* Number of processes contained in the system image. */
#define NR_BOOT_PROCS (NR_TASKS + INIT_PROC_NR + 1)
@ -257,10 +257,10 @@
# define IRQ_DISABLE 4 /* disable interrupts */
#define IRQ_VECTOR m5_c2 /* irq vector */
#define IRQ_POLICY m5_i1 /* options for IRQCTL request */
# define IRQ_REENABLE 0x001 /* reenable IRQ line after interrupt */
# define IRQ_BYTE 0x100 /* byte values */
# define IRQ_WORD 0x200 /* word values */
# define IRQ_LONG 0x400 /* long values */
# define IRQ_REENABLE 0x001 /* reenable IRQ line after interrupt */
# define IRQ_BYTE 0x100 /* byte values */
# define IRQ_WORD 0x200 /* word values */
# define IRQ_LONG 0x400 /* long values */
#define IRQ_PROC_NR m5_i2 /* process number, SELF, NONE */
#define IRQ_HOOK_ID m5_l3 /* id of irq hook at kernel */
@ -320,58 +320,58 @@
#define I_PROC_NR m7_i4 /* calling process */
#define I_VAL_PTR m7_p1 /* virtual address at caller */
#define I_VAL_LEN m7_i1 /* max length of value */
#define I_VAL_PTR2 m7_p2 /* second virtual address */
#define I_VAL_LEN2 m7_i2 /* second length, or proc nr */
#define I_VAL_PTR2 m7_p2 /* second virtual address */
#define I_VAL_LEN2 m7_i2 /* second length, or proc nr */
/* Field names for SYS_TIMES. */
#define T_PROC_NR m4_l1 /* process to request time info for */
#define T_USER_TIME m4_l1 /* user time consumed by process */
#define T_SYSTEM_TIME m4_l2 /* system time consumed by process */
#define T_CHILD_UTIME m4_l3 /* user time consumed by process' children */
#define T_CHILD_STIME m4_l4 /* sys time consumed by process' children */
#define T_BOOT_TICKS m4_l5 /* number of clock ticks since boot time */
#define T_PROC_NR m4_l1 /* process to request time info for */
#define T_USER_TIME m4_l1 /* user time consumed by process */
#define T_SYSTEM_TIME m4_l2 /* system time consumed by process */
#define T_CHILD_UTIME m4_l3 /* user time consumed by process' children */
#define T_CHILD_STIME m4_l4 /* sys time consumed by process' children */
#define T_BOOT_TICKS m4_l5 /* number of clock ticks since boot time */
/* Field names for SYS_TRACE, SYS_SVRCTL. */
#define CTL_PROC_NR m2_i1 /* process number of the caller */
#define CTL_REQUEST m2_i2 /* server control request */
#define CTL_MM_PRIV m2_i3 /* privilege as seen by PM */
#define CTL_ARG_PTR m2_p1 /* pointer to argument */
#define CTL_ADDRESS m2_l1 /* address at traced process' space */
#define CTL_DATA m2_l2 /* data field for tracing */
#define CTL_PROC_NR m2_i1 /* process number of the caller */
#define CTL_REQUEST m2_i2 /* server control request */
#define CTL_MM_PRIV m2_i3 /* privilege as seen by PM */
#define CTL_ARG_PTR m2_p1 /* pointer to argument */
#define CTL_ADDRESS m2_l1 /* address at traced process' space */
#define CTL_DATA m2_l2 /* data field for tracing */
/* Field names for SYS_KILL, SYS_SIGCTL */
#define SIG_REQUEST m2_l2 /* PM signal control request */
#define S_GETSIG 0 /* get pending kernel signal */
#define S_ENDSIG 1 /* finish a kernel signal */
#define S_SENDSIG 2 /* POSIX style signal handling */
#define S_SIGRETURN 3 /* return from POSIX handling */
#define S_KILL 4 /* servers kills process with signal */
#define SIG_PROC m2_i1 /* process number for inform */
#define SIG_NUMBER m2_i2 /* signal number to send */
#define SIG_FLAGS m2_i3 /* signal flags field */
#define SIG_MAP m2_l1 /* used by kernel to pass signal bit map */
#define SIG_CTXT_PTR m2_p1 /* pointer to info to restore signal context */
#define SIG_REQUEST m2_l2 /* PM signal control request */
#define S_GETSIG 0 /* get pending kernel signal */
#define S_ENDSIG 1 /* finish a kernel signal */
#define S_SENDSIG 2 /* POSIX style signal handling */
#define S_SIGRETURN 3 /* return from POSIX handling */
#define S_KILL 4 /* servers kills process with signal */
#define SIG_PROC m2_i1 /* process number for inform */
#define SIG_NUMBER m2_i2 /* signal number to send */
#define SIG_FLAGS m2_i3 /* signal flags field */
#define SIG_MAP m2_l1 /* used by kernel to pass signal bit map */
#define SIG_CTXT_PTR m2_p1 /* pointer to info to restore signal context */
/* Field names for SYS_FORK, _EXEC, _EXIT, _NEWMAP. */
#define PR_PROC_NR m1_i1 /* indicates a (child) process */
#define PR_PRIORITY m1_i2 /* process priority */
#define PR_PPROC_NR m1_i2 /* indicates a (parent) process */
#define PR_PID m1_i3 /* process id at process manager */
#define PR_STACK_PTR m1_p1 /* used for stack ptr in sys_exec, sys_getsp */
#define PR_TRACING m1_i3 /* flag to indicate tracing is on/ off */
#define PR_NAME_PTR m1_p2 /* tells where program name is for dmp */
#define PR_IP_PTR m1_p3 /* initial value for ip after exec */
#define PR_MEM_PTR m1_p1 /* tells where memory map is for sys_newmap */
#define PR_PROC_NR m1_i1 /* indicates a (child) process */
#define PR_PRIORITY m1_i2 /* process priority */
#define PR_PPROC_NR m1_i2 /* indicates a (parent) process */
#define PR_PID m1_i3 /* process id at process manager */
#define PR_STACK_PTR m1_p1 /* used for stack ptr in sys_exec, sys_getsp */
#define PR_TRACING m1_i3 /* flag to indicate tracing is on/ off */
#define PR_NAME_PTR m1_p2 /* tells where program name is for dmp */
#define PR_IP_PTR m1_p3 /* initial value for ip after exec */
#define PR_MEM_PTR m1_p1 /* tells where memory map is for sys_newmap */
/* Field names for SYS_INT86 */
#define INT86_REG86 m1_p1 /* pointer to registers */
#define INT86_REG86 m1_p1 /* pointer to registers */
/* Field names for SELECT (FS). */
#define SEL_NFDS m8_i1
#define SEL_READFDS m8_p1
#define SEL_WRITEFDS m8_p2
#define SEL_ERRORFDS m8_p3
#define SEL_TIMEOUT m8_p4
#define SEL_NFDS m8_i1
#define SEL_READFDS m8_p1
#define SEL_WRITEFDS m8_p2
#define SEL_ERRORFDS m8_p3
#define SEL_TIMEOUT m8_p4
/*===========================================================================*
* Messages for system management server *
@ -396,17 +396,17 @@
*===========================================================================*/
/* Miscellaneous request types and field names, e.g. used by IS server. */
#define PANIC_DUMPS 97 /* debug dumps at the TTY on RBT_PANIC */
#define FKEY_CONTROL 98 /* control a function key at the TTY */
# define FKEY_REQUEST m2_i1 /* request to perform at TTY */
#define PANIC_DUMPS 97 /* debug dumps at the TTY on RBT_PANIC */
#define FKEY_CONTROL 98 /* control a function key at the TTY */
# define FKEY_REQUEST m2_i1 /* request to perform at TTY */
# define FKEY_MAP 10 /* observe function key */
# define FKEY_UNMAP 11 /* stop observing function key */
# define FKEY_EVENTS 12 /* request open key presses */
# define FKEY_FKEYS m2_l1 /* F1-F12 keys pressed */
# define FKEY_SFKEYS m2_l2 /* Shift-F1-F12 keys pressed */
# define FKEY_FKEYS m2_l1 /* F1-F12 keys pressed */
# define FKEY_SFKEYS m2_l2 /* Shift-F1-F12 keys pressed */
#define DIAGNOSTICS 100 /* output a string without FS in between */
# define DIAG_PRINT_BUF m1_p1
# define DIAG_BUF_COUNT m1_i1
# define DIAG_PROC_NR m1_i2
# define DIAG_PRINT_BUF m1_p1
# define DIAG_BUF_COUNT m1_i1
# define DIAG_PROC_NR m1_i2
#endif /* _MINIX_COM_H */

View file

@ -30,30 +30,30 @@ extern struct dmap {
*===========================================================================*/
/* Total number of different devices. */
#define NR_DEVICES 32 /* number of (major) devices */
#define NR_DEVICES 32 /* number of (major) devices */
/* Major and minor device numbers for MEMORY driver. */
#define MEMORY_MAJOR 1 /* major device for memory devices */
# define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */
# define BOOT_DEV 4 /* minor device for /dev/boot */
# define ZERO_DEV 5 /* minor device for /dev/zero */
#define MEMORY_MAJOR 1 /* major device for memory devices */
# define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */
# define BOOT_DEV 4 /* minor device for /dev/boot */
# define ZERO_DEV 5 /* minor device for /dev/zero */
#define CTRLR(n) ((n)==0 ? 3 : (8 + 2*((n)-1))) /* magic formula */
/* Full device numbers that are special to the boot monitor and FS. */
# define DEV_RAM 0x0100 /* device number of /dev/ram */
# define DEV_BOOT 0x0104 /* device number of /dev/boot */
# define DEV_RAM 0x0100 /* device number of /dev/ram */
# define DEV_BOOT 0x0104 /* device number of /dev/boot */
#define FLOPPY_MAJOR 2 /* major device for floppy disks */
#define TTY_MAJOR 4 /* major device for ttys */
#define CTTY_MAJOR 5 /* major device for /dev/tty */
#define FLOPPY_MAJOR 2 /* major device for floppy disks */
#define TTY_MAJOR 4 /* major device for ttys */
#define CTTY_MAJOR 5 /* major device for /dev/tty */
#define INET_MAJOR 7 /* major device for inet */
#define INET_MAJOR 7 /* major device for inet */
#define LOG_MAJOR 15 /* major device for log driver */
# define IS_KLOG_DEV 0 /* minor device for /dev/klog */
#define LOG_MAJOR 15 /* major device for log driver */
# define IS_KLOG_DEV 0 /* minor device for /dev/klog */
#endif /* _DMAP_H */

View file

@ -81,9 +81,9 @@ typedef struct { u32_t _[2]; } u64_t;
* is clearer.
*/
typedef int Dev_t;
typedef int _mnx_Gid_t;
typedef int _mnx_Gid_t;
typedef int Nlink_t;
typedef int _mnx_Uid_t;
typedef int _mnx_Uid_t;
typedef int U8_t;
typedef unsigned long U32_t;
typedef int I8_t;
@ -98,7 +98,7 @@ typedef long I32_t;
* (which are not promoted) while providing information to the reader.
*/
typedef unsigned long Ino_t;
typedef unsigned long Ino_t;
#if _EM_WSIZE == 2
/*typedef unsigned int Ino_t; Ino_t is now 32 bits */
@ -112,7 +112,7 @@ typedef unsigned int _mnx_Mode_t;
typedef int Zone1_t;
typedef int Bitchunk_t;
typedef int U16_t;
typedef int _mnx_Mode_t;
typedef int _mnx_Mode_t;
#endif /* _EM_WSIZE == 2, etc */

View file

@ -7,7 +7,7 @@ typedef unsigned short tcflag_t;
typedef unsigned char cc_t;
typedef unsigned int speed_t;
#define NCCS 20 /* size of cc_c array, some extra space
#define NCCS 20 /* size of cc_c array, some extra space
* for extensions. */
/* Primary terminal control structure. POSIX Table 7-1. */
@ -62,17 +62,17 @@ struct termios {
#define TOSTOP 0x0100 /* send SIGTTOU (job control, not implemented*/
/* Indices into c_cc array. Default values in parentheses. POSIX Table 7-5. */
#define VEOF 0 /* cc_c[VEOF] = EOF char (^D) */
#define VEOL 1 /* cc_c[VEOL] = EOL char (undef) */
#define VERASE 2 /* cc_c[VERASE] = ERASE char (^H) */
#define VINTR 3 /* cc_c[VINTR] = INTR char (DEL) */
#define VKILL 4 /* cc_c[VKILL] = KILL char (^U) */
#define VMIN 5 /* cc_c[VMIN] = MIN value for timer */
#define VQUIT 6 /* cc_c[VQUIT] = QUIT char (^\) */
#define VTIME 7 /* cc_c[VTIME] = TIME value for timer */
#define VSUSP 8 /* cc_c[VSUSP] = SUSP (^Z, ignored) */
#define VSTART 9 /* cc_c[VSTART] = START char (^S) */
#define VSTOP 10 /* cc_c[VSTOP] = STOP char (^Q) */
#define VEOF 0 /* cc_c[VEOF] = EOF char (^D) */
#define VEOL 1 /* cc_c[VEOL] = EOL char (undef) */
#define VERASE 2 /* cc_c[VERASE] = ERASE char (^H) */
#define VINTR 3 /* cc_c[VINTR] = INTR char (DEL) */
#define VKILL 4 /* cc_c[VKILL] = KILL char (^U) */
#define VMIN 5 /* cc_c[VMIN] = MIN value for timer */
#define VQUIT 6 /* cc_c[VQUIT] = QUIT char (^\) */
#define VTIME 7 /* cc_c[VTIME] = TIME value for timer */
#define VSUSP 8 /* cc_c[VSUSP] = SUSP (^Z, ignored) */
#define VSTART 9 /* cc_c[VSTART] = START char (^S) */
#define VSTOP 10 /* cc_c[VSTOP] = STOP char (^Q) */
#define _POSIX_VDISABLE (cc_t)0xFF /* You can't even generate this
* character with 'normal' keyboards.

View file

@ -36,37 +36,37 @@
#endif
/* What system info to retrieve with sysgetinfo(). */
#define SI_KINFO 0 /* get kernel info via PM */
#define SI_PROC_ADDR 1 /* address of process table */
#define SI_PROC_TAB 2 /* copy of entire process table */
#define SI_DMAP_TAB 3 /* get device <-> driver mappings */
#define SI_KINFO 0 /* get kernel info via PM */
#define SI_PROC_ADDR 1 /* address of process table */
#define SI_PROC_TAB 2 /* copy of entire process table */
#define SI_DMAP_TAB 3 /* get device <-> driver mappings */
/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.7.1. */
#define NULL ((void *)0)
/* The following relate to configurable system variables. POSIX Table 4-2. */
#define _SC_ARG_MAX 1
#define _SC_CHILD_MAX 2
#define _SC_CLOCKS_PER_SEC 3
#define _SC_CLK_TCK 3
#define _SC_NGROUPS_MAX 4
#define _SC_OPEN_MAX 5
#define _SC_JOB_CONTROL 6
#define _SC_SAVED_IDS 7
#define _SC_VERSION 8
#define _SC_STREAM_MAX 9
#define _SC_TZNAME_MAX 10
#define _SC_ARG_MAX 1
#define _SC_CHILD_MAX 2
#define _SC_CLOCKS_PER_SEC 3
#define _SC_CLK_TCK 3
#define _SC_NGROUPS_MAX 4
#define _SC_OPEN_MAX 5
#define _SC_JOB_CONTROL 6
#define _SC_SAVED_IDS 7
#define _SC_VERSION 8
#define _SC_STREAM_MAX 9
#define _SC_TZNAME_MAX 10
/* The following relate to configurable pathname variables. POSIX Table 5-2. */
#define _PC_LINK_MAX 1 /* link count */
#define _PC_MAX_CANON 2 /* size of the canonical input queue */
#define _PC_MAX_INPUT 3 /* type-ahead buffer size */
#define _PC_NAME_MAX 4 /* file name size */
#define _PC_PATH_MAX 5 /* pathname size */
#define _PC_PIPE_BUF 6 /* pipe size */
#define _PC_NO_TRUNC 7 /* treatment of long name components */
#define _PC_VDISABLE 8 /* tty disable */
#define _PC_CHOWN_RESTRICTED 9 /* chown restricted or not */
#define _PC_LINK_MAX 1 /* link count */
#define _PC_MAX_CANON 2 /* size of the canonical input queue */
#define _PC_MAX_INPUT 3 /* type-ahead buffer size */
#define _PC_NAME_MAX 4 /* file name size */
#define _PC_PATH_MAX 5 /* pathname size */
#define _PC_PIPE_BUF 6 /* pipe size */
#define _PC_NO_TRUNC 7 /* treatment of long name components */
#define _PC_VDISABLE 8 /* tty disable */
#define _PC_CHOWN_RESTRICTED 9 /* chown restricted or not */
/* POSIX defines several options that may be implemented or not, at the
* implementer's whim. This implementer has made the following choices:
@ -119,10 +119,10 @@ _PROTOTYPE( int pause, (void) );
_PROTOTYPE( int pipe, (int _fildes[2]) );
_PROTOTYPE( ssize_t read, (int _fd, void *_buf, size_t _n) );
_PROTOTYPE( int rmdir, (const char *_path) );
_PROTOTYPE( int setgid, (_mnx_Gid_t _gid) );
_PROTOTYPE( int setgid, (_mnx_Gid_t _gid) );
_PROTOTYPE( int setpgid, (pid_t _pid, pid_t _pgid) );
_PROTOTYPE( pid_t setsid, (void) );
_PROTOTYPE( int setuid, (_mnx_Uid_t _uid) );
_PROTOTYPE( int setuid, (_mnx_Uid_t _uid) );
_PROTOTYPE( unsigned int sleep, (unsigned int _seconds) );
_PROTOTYPE( long sysconf, (int _name) );
_PROTOTYPE( pid_t tcgetpgrp, (int _fd) );
@ -160,7 +160,7 @@ _PROTOTYPE( int ttyslot, (void) );
_PROTOTYPE( int fttyslot, (int _fd) );
_PROTOTYPE( char *crypt, (const char *_key, const char *_salt) );
_PROTOTYPE( int getsysinfo, (int who, int what, void *where) );
_PROTOTYPE( int getprocnr, (void) );
_PROTOTYPE( int getprocnr, (void) );
_PROTOTYPE( int findproc, (char *proc_name, int *proc_nr) );
_PROTOTYPE( int allocmem, (phys_bytes size, phys_bytes *base) );
_PROTOTYPE( int freemem, (phys_bytes size, phys_bytes base) );