⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 def.h

📁 Linux0.01内核分析与操作系统设计配书光盘
💻 H
字号:
#include <stdio.h>
#include <limits.h>
#include <signal.h>
#include <fcntl.h>

#define TRUE 1
#define FALSE 0
#define OKAY 1
#define ERROR 0
#define MAXLINE 200                 /* Maximum length of input line */
#define MAXARG 20     /* Max number of args for each simple command */
#define PIPELINE 5   /* Max number of simple commands in a pipeline */
#define MAXNAME 100   /* Maximum length of i/o redirection filename */

char line[MAXLINE+1];                      /* User typed input line */
char *lineptr;             /* Pointer to current position in line[] */
char avline[MAXLINE+1];           /* Argv strings taken from line[] */
char *avptr;             /* Pointer to current position in avline[] */
char infile[MAXNAME+1];               /* Input redirection filename */
char outfile[MAXNAME+1];              /* Ouput redirection filename */

int backgnd;                  /* TRUE if & ends pipeline else FALSE */
int lastpid;              /* PID of last simple command in pipeline */
int append;          /* TRUE for append redirection (>>) else FALSE */

struct cmd
{
    char *av[MAXARG];
    int infd;
    int outfd;
} cmdlin[PIPELINE];        /* Argvs and fds, one per simple command */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -