Skip to content

Instantly share code, notes, and snippets.

@heumchul
heumchul / shell.c
Created October 26, 2014 12:29
homework of OS chapter2.
#define LINE_LEN 80 //The length of each command line.
#define MAX_ARGS 64 //The maximum amounts of arguments of each command.
#define MAX_ARG_LEN 16 //The length of each argument.
#define MAX_PATHS 64 //The maximum amounts of paths.
#define MAX_PATH_LEN 96 //The maximum length of each path.
#define WHITESPACE " .,\t\n" //Delimeters for command line.
#define TRUE 1 //1 for TRUE
#ifndef NULL //if NULL is not defined, then define NULL as 0
#define NULL 0
#endif