/* Copyright (C) 2008 Emmanuel Varoquaux This file is part of XOS. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _CONSTS_H #define _CONSTS_H /* Signaux */ #define SIGHUP 1 /* Hangup */ #define SIGINT 2 /* Interrupt */ #define SIGQUIT 3 /* Quit */ #define SIGILL 4 /* Illegal instruction */ #define SIGTRAP 5 /* Trace/breakpoint trap */ #define SIGABRT 6 /* Aborted */ #define SIGBUS 7 /* Bus error */ #define SIGFPE 8 /* Floating point exception */ #define SIGKILL 9 /* Killed */ #define SIGUSR1 10 /* User defined signal 1 */ #define SIGSEGV 11 /* Segmentation fault */ #define SIGUSR2 12 /* User defined signal 2 */ #define SIGPIPE 13 /* Broken pipe */ #define SIGALRM 14 /* Alarm clock */ #define SIGTERM 15 /* Terminated */ #define SIGSTKFLT 16 /* Stack fault */ #define SIGCHLD 17 /* Child exited */ #define SIGCONT 18 /* Continued */ #define SIGSTOP 19 /* Stopped (signal) */ #define SIGTSTP 20 /* Stopped */ #define SIGTTIN 21 /* Stopped (tty input) */ #define SIGTTOU 22 /* Stopped (tty output) */ #define SIGURG 23 /* Urgent I/O condition */ #define SIGXCPU 24 /* CPU time limit exceeded */ #define SIGXFSZ 25 /* File size limit exceeded */ #define SIGVTALRM 26 /* Virtual timer expired */ #define SIGPROF 27 /* Profiling timer expired */ #define SIGWINCH 28 /* Window changed */ #define SIGPOLL 29 /* I/O possible */ #define SIGPWR 30 /* Power failure */ #define SIGSYS 31 /* Bad system call */ /* Fichiers */ /* types de fichiers */ #define FT_NONE 0 #define FT_DIR 1 #define FT_CHR 2 #define FT_BLK 3 #define FT_REG 4 #define FT_PIPE 5 /* peripheriques */ #define DEV_NONE 0 #define DEV_FD 1 #define DEV_CONSOLE 2 #define DEV_NULL 3 #define DEV_ZERO 4 #define DEV_FULL 5 /* modes d'ouverture */ #define O_READ 0x1 #define O_WRITE 0x2 /* requetes fcntl */ #define F_DUPFD 0 /* duplique le descripteur de fichier */ #define F_GETFD 1 /* retourne les drapeaux du descripteur de fichier */ #define F_SETFD 2 /* positionne les drapeaux du descripteur de fichier */ #define FD_CLOEXEC 1 /* positionnement */ #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 /* Terminaux */ /* modes d'entree */ #define ICRNL 0x01 /* Convertit CR en NL. */ #define IGNCR 0x02 /* Ignore CR. */ #define INLCR 0x04 /* Convertit NL en CR. */ #define IUCLC 0x08 /* Convertit les majuscules en minuscules. */ #define IXANY 0x10 /* Autorise n'importe quel caractere a reprendre l'affichage. */ #define IXON 0x20 /* Active START et STOP. */ /* modes de sortie */ #define OPOST 0x01 /* Active le traitement des modes de sortie. */ #define OLCUC 0x02 /* Convertit les minuscules en majuscules. */ #define ONLCR 0x04 /* Convertit NL en CR-NL. */ #define OCRNL 0x08 /* Convertit CR en NL. */ #define ONOCR 0x10 /* Pas de CR a la colonne 0. */ #define ONLRET 0x20 /* NL fait CR. */ /* modes locaux */ #define ECHO 0x01 /* Active l'echo. */ #define ECHOCTL 0x02 /* Active l'echo des caracteres non-imprimables. */ #define ECHOE 0x04 /* Active l'echo de la correction par le caractere ERASE. */ #define ECHOK 0x08 /* Fait l'echo de NL apres KILL. */ #define ECHONL 0x10 /* Fait l'echo de NL meme si ECHO est desactive. */ #define ECHOKE 0x20 /* Efface la ligne avec KILL. */ #define ICANON 0x40 /* Mode canonique, active ERASE et KILL. */ #define ISIG 0x80 /* Active INTR. */ #define NOFLSH 0x100 /* Desactive le vidage apres une interruption. */ #define TOSTOP 0x200 /* Interdit l'ecriture sur un terminal aux processus d'arriere-plan. */ /* caracteres de controle */ #define NCCS 11U /* nombre de caracteres de controle */ #define VINTR 0 /* (ISIG) Tue les processus du groupe d'avant-plan. */ #define VQUIT 1 /* (ISIG) Tue les processus du groupe d'avant-plan. */ #define VERASE 2 /* (ICANON) Supprime le dernier caractere. */ #define VKILL 3 /* (ICANON) Supprime la ligne entiere. */ #define VEOF 4 /* (ICANON) Fin de fichier. */ #define VTIME 5 /* (~ICANON) Timeout. */ #define VMIN 6 /* (~ICANON) Nombre minimal de caracteres. */ #define VSTART 7 /* (IXON) Reprend l'affichage. */ #define VSTOP 8 /* (IXON) Suspend l'affichage. */ #define VSUSP 9 /* (ISIG) Tue les processus du groupe d'avant-plan. */ #define VEOL 10 /* (ICANON) Fin de ligne. */ /* requetes ioctl */ #define TGETIF 1 /* (unsigned long *) Donne les modes d'entree d'un terminal. */ #define TSETIF 2 /* (unsigned long *) Positionne les modes d'entree d'un terminal. */ #define TGETOF 3 /* (unsigned long *) Donne les modes de sortie d'un terminal. */ #define TSETOF 4 /* (unsigned long *) Positionne les modes de sortie d'un terminal. */ #define TGETLF 5 /* (unsigned long *) Donne les modes locaux d'un terminal. */ #define TSETLF 6 /* (unsigned long *) Positionne les modes locaux d'un terminal. */ #define TGETCC 7 /* (unsigned char *) Donne les caracteres de controle d'un terminal. */ #define TSETCC 8 /* (unsigned char *) Positionne les caracteres de controle d'un terminal. */ #define TGETPGID 9 /* (int *) Donne l'identifiant du groupe en avant-plan d'un terminal. */ #define TSETPGID 10 /* (int *) Positionne l'identifiant du groupe en avant-plan d'un terminal. */ #define TGETWSZ 11 /* (struct winsize_struct *) Donne les dimensions d'une fenetre de terminal. */ #define TGETCT 12 /* (int *) Donne le type du curseur d'un terminal. */ #define TSETCT 13 /* (int *) Positionne le type du curseur d'un terminal. */ /* Projections */ #define PROT_RDONLY 0 #define PROT_RDWR 1 /* Divers */ /* options de wait() */ #define WNOHANG 0x1 #define WUNTRACED 0x2 /* commandes de reboot() */ #define RB_HALT 1 #define RB_RESTART 2 #endif