diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..3295faf --- /dev/null +++ b/Doxyfile @@ -0,0 +1,280 @@ +# Doxyfile 1.7.4 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = Shell +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = +OUTPUT_DIRECTORY = docs +CREATE_SUBDIRS = YES +OUTPUT_LANGUAGE = Portuguese +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +TYPEDEF_HIDES_STRUCT = NO +SYMBOL_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES +HTML_ALIGN_MEMBERS = YES +HTML_DYNAMIC_SECTIONS = NO +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +USE_INLINE_TREES = NO +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_RELPATH = http://www.mathjax.org/mathjax +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = YES +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/Mainpage.h b/Mainpage.h new file mode 100644 index 0000000..a632b67 --- /dev/null +++ b/Mainpage.h @@ -0,0 +1,42 @@ +/** + * @mainpage Shell + * @author Lucas Lobosque - 6792645 + * @author José Leandro Pozer - 6793222 + * @date 16/11/2011 + * + * @section intro Introdução + * + * @subsection estrutura_basica_subsec Estrutura básica de Arquivos + * Desenvolvemos o shell utilizando 4 arquivos diferentes (e seus headers): + * + *
|
+ Shell
+ |
+
| COMMAND | Estrutura do comando |
| history | Lista simples para uso do comando builtin history |
| LIST | Estrutura da lista em si |
| NODE | Nó das listas de comandos e processos |
| PROCESS | Estrutura do processo |
1.7.4
+
+
diff --git a/docs/bc_s.png b/docs/bc_s.png
new file mode 100644
index 0000000..e401862
Binary files /dev/null and b/docs/bc_s.png differ
diff --git a/docs/classes.html b/docs/classes.html
new file mode 100644
index 0000000..4068fec
--- /dev/null
+++ b/docs/classes.html
@@ -0,0 +1,91 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/closed.png b/docs/closed.png
new file mode 100644
index 0000000..b7d4bd9
Binary files /dev/null and b/docs/closed.png differ
diff --git a/docs/d0/d29/main_8c.html b/docs/d0/d29/main_8c.html
new file mode 100644
index 0000000..1c86fe7
--- /dev/null
+++ b/docs/d0/d29/main_8c.html
@@ -0,0 +1,273 @@
+
+
+
+
+|
+ Shell
+ |
+
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/wait.h>#include <fcntl.h>#include <signal.h>#include "main.h"#include "parser.h"#include "builtin.h"#include "list.h"+Macros | |
| #define | _GNU_SOURCE |
+Funções | |
| int | main (int argc, char **argv) |
| void | printPrompt () |
| Imprime o prompt na tela (formato copiado do gnome shell). | |
| void | termination_handler (int signum) |
| Função executada quando usuário manda ctrl+c. | |
| void | child_handler (int signum) |
| Função executada quando um processo filho termina. | |
| void | sigtstop_handler (int signum) |
| Função executada quando usuário manda ctrl+z. | |
| void | free_memory () |
| Função que libera memória utilizada antes de terminar o programa. | |
| #define _GNU_SOURCE | +
| void child_handler | +( | +int | +signum | ) | ++ |
Função executada quando um processo filho termina.
+Esta função só é útil para processos em background, já que ela fica bloqueada quando um processo roda em foreground.
+| signum | - id do sinal. |
| void free_memory | +( | +) | ++ |
Função que libera memória utilizada antes de terminar o programa.
+| int main | +( | +int | +argc, | +
| + | + | char ** | +argv | +
| + | ) | ++ |
| void printPrompt | +( | +) | ++ |
Imprime o prompt na tela (formato copiado do gnome shell).
+| void sigtstop_handler | +( | +int | +signum | ) | ++ |
Função executada quando usuário manda ctrl+z.
+| signum | - id do sinal. |
| void termination_handler | +( | +int | +signum | ) | ++ |
Função executada quando usuário manda ctrl+c.
+| signum | - id do sinal. |
1.7.4
+
+
diff --git a/docs/d1/d2b/Mainpage_8h.html b/docs/d1/d2b/Mainpage_8h.html
new file mode 100644
index 0000000..34ebb2e
--- /dev/null
+++ b/docs/d1/d2b/Mainpage_8h.html
@@ -0,0 +1,86 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/d1/d2b/Mainpage_8h_source.html b/docs/d1/d2b/Mainpage_8h_source.html
new file mode 100644
index 0000000..7d23fab
--- /dev/null
+++ b/docs/d1/d2b/Mainpage_8h_source.html
@@ -0,0 +1,83 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/d2/d72/parser_8c.html b/docs/d2/d72/parser_8c.html
new file mode 100644
index 0000000..9bc26a7
--- /dev/null
+++ b/docs/d2/d72/parser_8c.html
@@ -0,0 +1,252 @@
+
+
+
+
+|
+ Shell
+ |
+
#include <string.h>#include <stdio.h>#include <stdlib.h>#include <ctype.h>#include "parser.h"#include "main.h"+Funções | |
| void | imprimir_argv (char **matriz, int tamanho) |
| int | word_count (char *source) |
| Conta o número de palavras de uma string. | |
| void | getCmds (LIST *cmdList, char *cmdLine) |
| Adiciona em uma lista o(s) comando(s) digitado(s) pelo usuário. | |
| void | parse (char *cmdLine, COMMAND *cmd) |
| Recebe a linha de comando e separa os argumentos. | |
| char * | readline () |
| Lê o comando digitado pelo usuário. | |
| void getCmds | +( | +LIST * | +cmdList, | +
| + | + | char * | +cmdLine | +
| + | ) | ++ |
Adiciona em uma lista o(s) comando(s) digitado(s) pelo usuário.
+Pega toda a linha de comando digitada e adiciona o comando com seus parâmetros na lista. Em caso de uso do pipe, haverá mais de um comando a ser executado, ela quebrará a linha de comando e colocará cada comando com seus parâmetros em uma lista.
+| cmdList | - lista onde os comandos serão armazenados |
| cmdLine | - linha de comando digitada pelo usuário |
| void imprimir_argv | +( | +char ** | +matriz, | +
| + | + | int | +tamanho | +
| + | ) | ++ |
| void parse | +( | +char * | +cmdLine, | +
| + | + | COMMAND * | +command | +
| + | ) | ++ |
Recebe a linha de comando e separa os argumentos.
+Retira os espaços entre os comandos e seus argumentos, armazena os comandos e seus parâmetros em um vetor de strings, na última posição do vetor coloca NULL, isso para o camando ser interpretado pela função execvp.
+| cmdLine | - linha de comando que será "parseada". |
| command | - estrutura que receberá cada comando, com suas flags e parâmetros |
| char* readline | +( | +) | ++ |
Lê o comando digitado pelo usuário.
+| int word_count | +( | +char * | +source | ) | ++ |
Conta o número de palavras de uma string.
+| source | - String para contar. |
1.7.4
+
+
diff --git a/docs/d4/dbf/main_8h.html b/docs/d4/dbf/main_8h.html
new file mode 100644
index 0000000..74e256e
--- /dev/null
+++ b/docs/d4/dbf/main_8h.html
@@ -0,0 +1,321 @@
+
+
+
+
+|
+ Shell
+ |
+
#include "list.h"Ir para o código fonte deste ficheiro.
++Funções | |
| void | printPrompt () |
| Imprime o prompt na tela (formato copiado do gnome shell). | |
| void | termination_handler (int signum) |
| Função executada quando usuário manda ctrl+c. | |
| void | child_handler (int signum) |
| Função executada quando um processo filho termina. | |
| void | sigtstop_handler (int signum) |
| Função executada quando usuário manda ctrl+z. | |
| void | free_memory () |
| Função que libera memória utilizada antes de terminar o programa. | |
+Variáveis | |
| char * | userdir |
| char * | username |
| char | hostname [256] |
| char * | cmdLine |
| HISTORY * | history |
| LIST * | cmdList |
| LIST * | childs |
| void child_handler | +( | +int | +signum | ) | ++ |
Função executada quando um processo filho termina.
+Esta função só é útil para processos em background, já que ela fica bloqueada quando um processo roda em foreground.
+| signum | - id do sinal. |
| void free_memory | +( | +) | ++ |
Função que libera memória utilizada antes de terminar o programa.
+| void printPrompt | +( | +) | ++ |
Imprime o prompt na tela (formato copiado do gnome shell).
+| void sigtstop_handler | +( | +int | +signum | ) | ++ |
Função executada quando usuário manda ctrl+z.
+| signum | - id do sinal. |
| void termination_handler | +( | +int | +signum | ) | ++ |
Função executada quando usuário manda ctrl+c.
+| signum | - id do sinal. |
| char* cmdLine | +
| char hostname[256] | +
| char* userdir | +
| char* username | +
1.7.4
+
+
diff --git a/docs/d4/dbf/main_8h_source.html b/docs/d4/dbf/main_8h_source.html
new file mode 100644
index 0000000..2b3182d
--- /dev/null
+++ b/docs/d4/dbf/main_8h_source.html
@@ -0,0 +1,106 @@
+
+
+
+
+|
+ Shell
+ |
+
00001 #ifndef _MAIN_H_ +00002 #define _MAIN_H_ +00003 #include "list.h" +00004 +00010 void printPrompt(); +00011 +00018 void termination_handler(int signum); +00019 +00030 void child_handler(int signum); +00031 +00038 void sigtstop_handler(int signum); +00039 +00046 void free_memory(); +00047 +00048 char * userdir; +00049 char * username; +00050 char hostname[256]; +00051 char * cmdLine; +00052 +00053 HISTORY *history; +00054 LIST * cmdList; +00055 LIST * childs; +00056 +00057 #endif +
1.7.4
+
+
diff --git a/docs/d5/d36/parser_8h.html b/docs/d5/d36/parser_8h.html
new file mode 100644
index 0000000..cb1f2cf
--- /dev/null
+++ b/docs/d5/d36/parser_8h.html
@@ -0,0 +1,221 @@
+
+
+
+
+|
+ Shell
+ |
+
#include "list.h"Ir para o código fonte deste ficheiro.
++Funções | |
| int | word_count (char *source) |
| Conta o número de palavras de uma string. | |
| char * | readline () |
| Lê o comando digitado pelo usuário. | |
| void | getCmds (LIST *cmdList, char *cmdLine) |
| Adiciona em uma lista o(s) comando(s) digitado(s) pelo usuário. | |
| void | parse (char *cmdLine, COMMAND *command) |
| Recebe a linha de comando e separa os argumentos. | |
| void getCmds | +( | +LIST * | +cmdList, | +
| + | + | char * | +cmdLine | +
| + | ) | ++ |
Adiciona em uma lista o(s) comando(s) digitado(s) pelo usuário.
+Pega toda a linha de comando digitada e adiciona o comando com seus parâmetros na lista. Em caso de uso do pipe, haverá mais de um comando a ser executado, ela quebrará a linha de comando e colocará cada comando com seus parâmetros em uma lista.
+| cmdList | - lista onde os comandos serão armazenados |
| cmdLine | - linha de comando digitada pelo usuário |
| void parse | +( | +char * | +cmdLine, | +
| + | + | COMMAND * | +command | +
| + | ) | ++ |
Recebe a linha de comando e separa os argumentos.
+Retira os espaços entre os comandos e seus argumentos, armazena os comandos e seus parâmetros em um vetor de strings, na última posição do vetor coloca NULL, isso para o camando ser interpretado pela função execvp.
+| cmdLine | - linha de comando que será "parseada". |
| command | - estrutura que receberá cada comando, com suas flags e parâmetros |
| char* readline | +( | +) | ++ |
Lê o comando digitado pelo usuário.
+| int word_count | +( | +char * | +source | ) | ++ |
Conta o número de palavras de uma string.
+| source | - String para contar. |
1.7.4
+
+
diff --git a/docs/d5/d36/parser_8h_source.html b/docs/d5/d36/parser_8h_source.html
new file mode 100644
index 0000000..e09c6cb
--- /dev/null
+++ b/docs/d5/d36/parser_8h_source.html
@@ -0,0 +1,94 @@
+
+
+
+
+
1.7.4
+
+
diff --git a/docs/d6/dcd/builtin_8h.html b/docs/d6/dcd/builtin_8h.html
new file mode 100644
index 0000000..444e51c
--- /dev/null
+++ b/docs/d6/dcd/builtin_8h.html
@@ -0,0 +1,466 @@
+
+
+
+
+|
+ Shell
+ |
+
Ir para o código fonte deste ficheiro.
++Funções | |
| int | isBuiltIn (char *cmd) |
| Verifica se o comando é BuiltIn. | |
| void | callBuiltIn (int cmd_id, COMMAND *cmd) |
| Executa o comando BuiltIn. | |
| void | add_history (char *cmd) |
| Adiciona o comando do usuário na lista do histórico. | |
| void | print_history (COMMAND *cmd) |
| Imprime os comando armazenados no histórico. | |
| void | free_history () |
| Libera memória alocada pelo histórico. | |
| void | cd (char *arg) |
| Muda o diretório atual no qual o sistema está trabalhando. | |
| void | pwd (COMMAND *cmd) |
| Mostra o diretório no qual o sistema está trabalhando. | |
| void | jobs (COMMAND *cmd) |
| Mostra uma lista com os jobs atuais. | |
| void | bg (char *arg) |
| Coloca um processo em background. | |
| void | fg (char *arg) |
| Coloca um processo suspenso em foreground. | |
| void | kill_cmd (char *arg) |
| Manda o sinal SIGTERM para um processo filho. | |
| void | echo (COMMAND *cmd) |
| imprime os argumentos enviados na tela. | |
| void | about (COMMAND *cmd) |
| Comando simples que imprime informações sobre os autores. | |
| void about | +( | +COMMAND * | +cmd | ) | ++ |
Comando simples que imprime informações sobre os autores.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
| void add_history | +( | +char * | +cmd | ) | ++ |
Adiciona o comando do usuário na lista do histórico.
+| cmd | - Comando a ser adicionado. |
| void bg | +( | +char * | +arg | ) | ++ |
Coloca um processo em background.
+| arg | - Id do processo a ser colocado em background, se for NULL o processo mais recente é colocado em foreground. |
| void callBuiltIn | +( | +int | +cmd_id, | +
| + | + | COMMAND * | +cmd | +
| + | ) | ++ |
Executa o comando BuiltIn.
+| cmd_id | - id do comando a ser executado, retorno da função isBuiltIn. |
| cmd | - Estrutura com informações do comando. |
| void cd | +( | +char * | +arg | ) | ++ |
Muda o diretório atual no qual o sistema está trabalhando.
+| arg | - Diretorio para o qual deseja mudar. |
| void echo | +( | +COMMAND * | +cmd | ) | ++ |
imprime os argumentos enviados na tela.
+| cmd | - Estrutura com informações do comando. Daqui se extrai os argumentos a serem imprimidos. (Também necessário para redirecionamento de saída). |
| void fg | +( | +char * | +arg | ) | ++ |
Coloca um processo suspenso em foreground.
+| arg | - Id do processo a ser colocado em foreground, se for NULL o processo suspenso mais recente é colocado em foreground. |
| void free_history | +( | +) | ++ |
Libera memória alocada pelo histórico.
+| int isBuiltIn | +( | +char * | +cmd | ) | ++ |
Verifica se o comando é BuiltIn.
+Se o comando for BuiltIn, retorna seu id para ser executado posteriormente.
+| cmd | - comando a ser analisado. |
| -1 | Se o comando não é BuiltIn. |
| void jobs | +( | +COMMAND * | +cmd | ) | ++ |
Mostra uma lista com os jobs atuais.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
| void kill_cmd | +( | +char * | +arg | ) | ++ |
Manda o sinal SIGTERM para um processo filho.
+| arg | - Id do processo a receber o sinal, se for NULL o processo mais recente recebe o sinal. |
| void print_history | +( | +COMMAND * | +cmd | ) | ++ |
Imprime os comando armazenados no histórico.
+| cmd | - Estrutura com possível parâmetro do comando, representa quantos comandos deseja imprimir, se for NULL imprime os últimos 10, que é o valor default. |
| void pwd | +( | +COMMAND * | +cmd | ) | ++ |
Mostra o diretório no qual o sistema está trabalhando.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
1.7.4
+
+
diff --git a/docs/d6/dcd/builtin_8h_source.html b/docs/d6/dcd/builtin_8h_source.html
new file mode 100644
index 0000000..c034c00
--- /dev/null
+++ b/docs/d6/dcd/builtin_8h_source.html
@@ -0,0 +1,111 @@
+
+
+
+
+|
+ Shell
+ |
+
00001 #ifndef _BUILTIN_H_ +00002 #define _BUILTIN_H_ +00003 +00014 int isBuiltIn(char * cmd); +00015 +00023 void callBuiltIn(int cmd_id, COMMAND *cmd); +00024 +00031 void add_history(char * cmd); +00032 +00041 void print_history(COMMAND *cmd); +00042 +00048 void free_history(); +00049 +00056 void cd(char * arg); +00057 +00065 void pwd(COMMAND *cmd); +00066 +00074 void jobs(COMMAND *cmd); +00075 +00083 void bg(char * arg); +00084 +00092 void fg(char * arg); +00093 +00101 void kill_cmd(char * arg); +00102 +00111 void echo (COMMAND *cmd); +00112 +00120 void about(COMMAND *cmd); +00121 #endif +
1.7.4
+
+
diff --git a/docs/d7/d40/list_8c.html b/docs/d7/d40/list_8c.html
new file mode 100644
index 0000000..46a6f0c
--- /dev/null
+++ b/docs/d7/d40/list_8c.html
@@ -0,0 +1,407 @@
+
+
+
+
+|
+ Shell
+ |
+
+Funções | |
| void | ListCreate (LIST *list) |
| Inicializa a lista para uso posterior. | |
| void | initCommand (COMMAND *cmd) |
| Inicializa um comando (estrutura) para uso posterior. | |
| int | ListIsEmpty (LIST *list) |
| Verifica se uma lista está vazia. | |
| int | ListInsert (LIST *list, PROCESS *proc, COMMAND *cmd) |
| Insere um processo e/ou um comando na lista. | |
| int | ListRemoveByPid (LIST *list, pid_t pid) |
| Remove um processo da lista pelo seu ID. | |
| PROCESS * | ListGetCurrentProcess (LIST *list) |
| Retorna o processo que está rodando em foreground. | |
| PROCESS * | ListGetLastStopped (LIST *list) |
| Busca e retorna o processo parado mais recente. | |
| PROCESS * | ListGetProcess (LIST *list, pid_t pid) |
| Retorna um processo pelo seu id. | |
| void | ListPurgeCmds (LIST *list) |
| Libera espaço alocado pela lista de comandos. | |
| void initCommand | +( | +COMMAND * | +cmd | ) | ++ |
Inicializa um comando (estrutura) para uso posterior.
+| cmd | - Ponteiro para comando (estrutura) a ser inicializada. |
| void ListCreate | +( | +LIST * | +list | ) | ++ |
Inicializa a lista para uso posterior.
+| list | - Ponteiro para lista a ser inicializada. |
Retorna o processo que está rodando em foreground.
+| list | - Ponteiro para a lista de processos. |
Busca e retorna o processo parado mais recente.
+| list | - Ponteiro para a lista de processos. |
Retorna um processo pelo seu id.
+| list | - Ponteiro para a lista. |
| pid | - Id do processo a ser procurado. |
| int ListInsert | +( | +LIST * | +list, | +
| + | + | PROCESS * | +proc, | +
| + | + | COMMAND * | +cmd | +
| + | ) | ++ |
Insere um processo e/ou um comando na lista.
+Na prática, deve ser usada uma lista para comandos e outra para processos. Elas só estão na mesma estrutura para evitar repetição de código. Caso esteja inserindo em uma lista de processos, o argumento cmd deve ser NULL. Caso esteja inserindo em uma lista de comandos, o argumento proc deve ser NULL.
+| list | - Ponteiro para a lista. |
| proc | - Ponteiro para processo (estrutura). |
| cmd | - Ponteiro para comando (estrutura). |
| 1 | - Sim. |
| 0 | - Não. |
| int ListIsEmpty | +( | +LIST * | +list | ) | ++ |
Verifica se uma lista está vazia.
+| list | - Ponteiro para a lista. |
| 1 | - Sim. |
| 0 | - Não. |
| void ListPurgeCmds | +( | +LIST * | +list | ) | ++ |
Libera espaço alocado pela lista de comandos.
+| list | - Ponteiro para a lista de comandos. |
| int ListRemoveByPid | +( | +LIST * | +list, | +
| + | + | pid_t | +pid | +
| + | ) | ++ |
Remove um processo da lista pelo seu ID.
+| list | - Ponteiro para a lista de processos. |
| pid | - ID do processo. |
| 1 | - Sim. |
| 0 | - Não. |
1.7.4
+
+
diff --git a/docs/d8/d91/structLIST.html b/docs/d8/d91/structLIST.html
new file mode 100644
index 0000000..d7b0872
--- /dev/null
+++ b/docs/d8/d91/structLIST.html
@@ -0,0 +1,128 @@
+
+
+
+
+|
+ Shell
+ |
+
Estrutura da lista em si. + Mais...
+ +#include <list.h>
+Campos de Dados | |
| NODE * | first |
| NODE * | last |
Estrutura da lista em si.
+| NODE* LIST::first | +
| NODE* LIST::last | +
1.7.4
+
+
diff --git a/docs/d9/d2e/structhistory.html b/docs/d9/d2e/structhistory.html
new file mode 100644
index 0000000..5dfa6ca
--- /dev/null
+++ b/docs/d9/d2e/structhistory.html
@@ -0,0 +1,128 @@
+
+
+
+
+|
+ Shell
+ |
+
Lista simples para uso do comando builtin history. + Mais...
+ +#include <list.h>
+Campos de Dados | |
| char * | cmd |
| struct history * | next |
Lista simples para uso do comando builtin history.
+| char* history::cmd | +
| struct history* history::next | +
1.7.4
+
+
diff --git a/docs/da/d23/list_8h.html b/docs/da/d23/list_8h.html
new file mode 100644
index 0000000..b53913f
--- /dev/null
+++ b/docs/da/d23/list_8h.html
@@ -0,0 +1,457 @@
+
+
+
+
+|
+ Shell
+ |
+
Ir para o código fonte deste ficheiro.
++Estruturas de Dados | |
| struct | history |
| Lista simples para uso do comando builtin history. Mais... | |
| struct | PROCESS |
| Estrutura do processo. Mais... | |
| struct | COMMAND |
| Estrutura do comando. Mais... | |
| struct | NODE |
| Nó das listas de comandos e processos. Mais... | |
| struct | LIST |
| Estrutura da lista em si. Mais... | |
+Definições de tipos | |
| typedef struct history | HISTORY |
| Lista simples para uso do comando builtin history. | |
| typedef struct NODE | NODE |
| Nó das listas de comandos e processos. | |
+Funções | |
| void | ListCreate (LIST *list) |
| Inicializa a lista para uso posterior. | |
| void | initCommand (COMMAND *cmd) |
| Inicializa um comando (estrutura) para uso posterior. | |
| int | ListIsEmpty (LIST *list) |
| Verifica se uma lista está vazia. | |
| int | ListInsert (LIST *list, PROCESS *proc, COMMAND *cmd) |
| Insere um processo e/ou um comando na lista. | |
| int | ListRemoveByPid (LIST *list, pid_t pid) |
| Remove um processo da lista pelo seu ID. | |
| PROCESS * | ListGetCurrentProcess (LIST *list) |
| Retorna o processo que está rodando em foreground. | |
| PROCESS * | ListGetLastStopped (LIST *list) |
| Busca e retorna o processo parado mais recente. | |
| PROCESS * | ListGetProcess (LIST *list, pid_t pid) |
| Retorna um processo pelo seu id. | |
| void | ListPurgeCmds (LIST *list) |
| Libera espaço alocado pela lista de comandos. | |
Lista simples para uso do comando builtin history.
+ +Nó das listas de comandos e processos.
+Temos na mesma estrutura de nó um ponteiro para comando e outro para processo. Isso foi feito para facilitar a implementação, os dois não devem ser usados juntos.
+ +| void initCommand | +( | +COMMAND * | +cmd | ) | ++ |
Inicializa um comando (estrutura) para uso posterior.
+| cmd | - Ponteiro para comando (estrutura) a ser inicializada. |
| void ListCreate | +( | +LIST * | +list | ) | ++ |
Inicializa a lista para uso posterior.
+| list | - Ponteiro para lista a ser inicializada. |
Retorna o processo que está rodando em foreground.
+| list | - Ponteiro para a lista de processos. |
Busca e retorna o processo parado mais recente.
+| list | - Ponteiro para a lista de processos. |
Retorna um processo pelo seu id.
+| list | - Ponteiro para a lista. |
| pid | - Id do processo a ser procurado. |
| int ListInsert | +( | +LIST * | +list, | +
| + | + | PROCESS * | +proc, | +
| + | + | COMMAND * | +cmd | +
| + | ) | ++ |
Insere um processo e/ou um comando na lista.
+Na prática, deve ser usada uma lista para comandos e outra para processos. Elas só estão na mesma estrutura para evitar repetição de código. Caso esteja inserindo em uma lista de processos, o argumento cmd deve ser NULL. Caso esteja inserindo em uma lista de comandos, o argumento proc deve ser NULL.
+| list | - Ponteiro para a lista. |
| proc | - Ponteiro para processo (estrutura). |
| cmd | - Ponteiro para comando (estrutura). |
| 1 | - Sim. |
| 0 | - Não. |
| int ListIsEmpty | +( | +LIST * | +list | ) | ++ |
Verifica se uma lista está vazia.
+| list | - Ponteiro para a lista. |
| 1 | - Sim. |
| 0 | - Não. |
| void ListPurgeCmds | +( | +LIST * | +list | ) | ++ |
Libera espaço alocado pela lista de comandos.
+| list | - Ponteiro para a lista de comandos. |
| int ListRemoveByPid | +( | +LIST * | +list, | +
| + | + | pid_t | +pid | +
| + | ) | ++ |
Remove um processo da lista pelo seu ID.
+| list | - Ponteiro para a lista de processos. |
| pid | - ID do processo. |
| 1 | - Sim. |
| 0 | - Não. |
1.7.4
+
+
diff --git a/docs/da/d23/list_8h_source.html b/docs/da/d23/list_8h_source.html
new file mode 100644
index 0000000..78f6340
--- /dev/null
+++ b/docs/da/d23/list_8h_source.html
@@ -0,0 +1,149 @@
+
+
+
+
+|
+ Shell
+ |
+
00001 #ifndef _LISTA_H_ +00002 #define _LISTA_H_ +00003 +00007 typedef struct history +00008 { +00009 char * cmd; +00010 struct history *next; +00011 } HISTORY; +00012 +00019 typedef struct +00020 { +00021 pid_t pid; +00022 char command[256]; +00023 char status[100]; +00024 int isBackground; +00025 } PROCESS; +00026 +00037 typedef struct +00038 { +00039 char **args; +00040 int isBackground; +00041 int input_r; +00042 int output_r; +00043 int output_r_append; +00044 int size; +00045 char * output_r_filename; +00046 char * input_r_filename; +00047 int id; +00048 int pipe[2]; +00049 pid_t pid; +00050 } COMMAND; +00051 +00059 typedef struct NODE +00060 { +00061 PROCESS *proc; +00062 COMMAND *cmd; +00063 struct NODE *next; +00064 struct NODE *prev; +00065 } NODE; +00066 +00067 +00071 typedef struct +00072 { +00073 NODE *first; +00074 NODE *last; +00075 } LIST; +00076 +00077 +00082 void ListCreate(LIST *list); +00083 +00090 void initCommand(COMMAND *cmd); +00091 +00098 int ListIsEmpty(LIST *list); +00099 +00117 int ListInsert(LIST *list, PROCESS *proc, COMMAND *cmd); +00118 +00126 int ListRemoveByPid(LIST *list, pid_t pid); +00127 +00132 PROCESS *ListGetCurrentProcess(LIST *list); +00133 +00138 PROCESS * ListGetLastStopped(LIST *list); +00139 +00146 PROCESS * ListGetProcess(LIST *list, pid_t pid); +00147 +00152 void ListPurgeCmds(LIST *list); +00153 +00154 #endif +
1.7.4
+
+
diff --git a/docs/db/d62/structNODE.html b/docs/db/d62/structNODE.html
new file mode 100644
index 0000000..97208da
--- /dev/null
+++ b/docs/db/d62/structNODE.html
@@ -0,0 +1,157 @@
+
+
+
+
+|
+ Shell
+ |
+
Nó das listas de comandos e processos. + Mais...
+ +#include <list.h>
+Campos de Dados | |
| PROCESS * | proc |
| COMMAND * | cmd |
| struct NODE * | next |
| struct NODE * | prev |
Nó das listas de comandos e processos.
+Temos na mesma estrutura de nó um ponteiro para comando e outro para processo. Isso foi feito para facilitar a implementação, os dois não devem ser usados juntos.
+| struct NODE* NODE::next | +
| struct NODE* NODE::prev | +
| PROCESS* NODE::proc | +
1.7.4
+
+
diff --git a/docs/dc/d56/structCOMMAND.html b/docs/dc/d56/structCOMMAND.html
new file mode 100644
index 0000000..df437f2
--- /dev/null
+++ b/docs/dc/d56/structCOMMAND.html
@@ -0,0 +1,255 @@
+
+
+
+
+|
+ Shell
+ |
+
Estrutura do comando. + Mais...
+ +#include <list.h>
+Campos de Dados | |
| char ** | args |
| int | isBackground |
| int | input_r |
| int | output_r |
| int | output_r_append |
| int | size |
| char * | output_r_filename |
| char * | input_r_filename |
| int | id |
| int | pipe [2] |
| pid_t | pid |
Estrutura do comando.
+Esta estrutura guarda todas as informações pertinentes de um comando. Nesta implementação, um comando é definido como um execultável ou builtin e seus argumentos. cat arquivo | grep palavra | cut -c 1-6 tem 3 comandos, por exemplo.
+| char** COMMAND::args | +
| int COMMAND::id | +
| int COMMAND::input_r | +
| char* COMMAND::input_r_filename | +
| int COMMAND::isBackground | +
| int COMMAND::output_r | +
| int COMMAND::output_r_append | +
| char* COMMAND::output_r_filename | +
| pid_t COMMAND::pid | +
| int COMMAND::pipe[2] | +
| int COMMAND::size | +
1.7.4
+
+
diff --git a/docs/dc/dd8/structPROCESS.html b/docs/dc/dd8/structPROCESS.html
new file mode 100644
index 0000000..fb3923c
--- /dev/null
+++ b/docs/dc/dd8/structPROCESS.html
@@ -0,0 +1,157 @@
+
+
+
+
+|
+ Shell
+ |
+
Estrutura do processo. + Mais...
+ +#include <list.h>
+Campos de Dados | |
| pid_t | pid |
| char | command [256] |
| char | status [100] |
| int | isBackground |
Estrutura do processo.
+Esta estrutura guarda todas as informações pertinentes de um processo.
+| char PROCESS::command[256] | +
| int PROCESS::isBackground | +
| pid_t PROCESS::pid | +
| char PROCESS::status[100] | +
1.7.4
+
+
diff --git a/docs/dd/da0/todo.html b/docs/dd/da0/todo.html
new file mode 100644
index 0000000..37c8976
--- /dev/null
+++ b/docs/dd/da0/todo.html
@@ -0,0 +1,82 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/df/d8a/builtin_8c.html b/docs/df/d8a/builtin_8c.html
new file mode 100644
index 0000000..ca96261
--- /dev/null
+++ b/docs/df/d8a/builtin_8c.html
@@ -0,0 +1,475 @@
+
+
+
+
+|
+ Shell
+ |
+
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <wait.h>#include <unistd.h>#include <fcntl.h>#include "main.h"#include "builtin.h"#include "parser.h"#include "list.h"+Funções | |
| int | isBuiltIn (char *cmd) |
| Verifica se o comando é BuiltIn. | |
| void | callBuiltIn (int cmd_id, COMMAND *cmd) |
| Executa o comando BuiltIn. | |
| void | add_history (char *cmd) |
| Adiciona o comando do usuário na lista do histórico. | |
| void | print_history (COMMAND *cmd) |
| Imprime os comando armazenados no histórico. | |
| void | free_history () |
| Libera memória alocada pelo histórico. | |
| void | cd (char *arg) |
| Muda o diretório atual no qual o sistema está trabalhando. | |
| void | pwd (COMMAND *cmd) |
| Mostra o diretório no qual o sistema está trabalhando. | |
| void | jobs (COMMAND *cmd) |
| Mostra uma lista com os jobs atuais. | |
| void | bg (char *arg) |
| Coloca um processo em background. | |
| void | fg (char *arg) |
| Coloca um processo suspenso em foreground. | |
| void | kill_cmd (char *arg) |
| Manda o sinal SIGTERM para um processo filho. | |
| void | echo (COMMAND *cmd) |
| imprime os argumentos enviados na tela. | |
| void | about (COMMAND *cmd) |
| Comando simples que imprime informações sobre os autores. | |
| void about | +( | +COMMAND * | +cmd | ) | ++ |
Comando simples que imprime informações sobre os autores.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
| void add_history | +( | +char * | +cmd | ) | ++ |
Adiciona o comando do usuário na lista do histórico.
+| cmd | - Comando a ser adicionado. |
| void bg | +( | +char * | +arg | ) | ++ |
Coloca um processo em background.
+| arg | - Id do processo a ser colocado em background, se for NULL o processo mais recente é colocado em foreground. |
| void callBuiltIn | +( | +int | +cmd_id, | +
| + | + | COMMAND * | +cmd | +
| + | ) | ++ |
Executa o comando BuiltIn.
+| cmd_id | - id do comando a ser executado, retorno da função isBuiltIn. |
| cmd | - Estrutura com informações do comando. |
| void cd | +( | +char * | +arg | ) | ++ |
Muda o diretório atual no qual o sistema está trabalhando.
+| arg | - Diretorio para o qual deseja mudar. |
| void echo | +( | +COMMAND * | +cmd | ) | ++ |
imprime os argumentos enviados na tela.
+| cmd | - Estrutura com informações do comando. Daqui se extrai os argumentos a serem imprimidos. (Também necessário para redirecionamento de saída). |
| void fg | +( | +char * | +arg | ) | ++ |
Coloca um processo suspenso em foreground.
+| arg | - Id do processo a ser colocado em foreground, se for NULL o processo suspenso mais recente é colocado em foreground. |
| void free_history | +( | +) | ++ |
Libera memória alocada pelo histórico.
+| int isBuiltIn | +( | +char * | +cmd | ) | ++ |
Verifica se o comando é BuiltIn.
+Se o comando for BuiltIn, retorna seu id para ser executado posteriormente.
+| cmd | - comando a ser analisado. |
| -1 | Se o comando não é BuiltIn. |
| void jobs | +( | +COMMAND * | +cmd | ) | ++ |
Mostra uma lista com os jobs atuais.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
| void kill_cmd | +( | +char * | +arg | ) | ++ |
Manda o sinal SIGTERM para um processo filho.
+| arg | - Id do processo a receber o sinal, se for NULL o processo mais recente recebe o sinal. |
| void print_history | +( | +COMMAND * | +cmd | ) | ++ |
Imprime os comando armazenados no histórico.
+| cmd | - Estrutura com possível parâmetro do comando, representa quantos comandos deseja imprimir, se for NULL imprime os últimos 10, que é o valor default. |
| void pwd | +( | +COMMAND * | +cmd | ) | ++ |
Mostra o diretório no qual o sistema está trabalhando.
+| cmd | - Estrutura com informações do comando. (Necessário para redirecionamento de saída). |
1.7.4
+
+
diff --git a/docs/doxygen.css b/docs/doxygen.css
new file mode 100644
index 0000000..74445fe
--- /dev/null
+++ b/docs/doxygen.css
@@ -0,0 +1,835 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+ font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+ font-size: 12px;
+}
+
+/* @group Heading Levels */
+
+h1 {
+ font-size: 150%;
+}
+
+.title {
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h2 {
+ font-size: 120%;
+}
+
+h3 {
+ font-size: 100%;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+ margin-top: 2px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #3D578C;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #4665A2;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #9CAFD4;
+ color: #ffffff;
+ border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code {
+ color: #4665A2;
+}
+
+a.codeRef {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+}
+
+div.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 10px;
+ margin-right: 5px;
+}
+
+td.indexkey {
+ background-color: #EBEFF6;
+ font-weight: bold;
+ border: 1px solid #C4CFE5;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+}
+
+td.indexvalue {
+ background-color: #EBEFF6;
+ border: 1px solid #C4CFE5;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+ background: #EBEFF6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #F9FAFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #C4CFE5;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: #4665A2;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #4665A2;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+ margin-left: 6px;
+}
+
+.memproto {
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 0px 6px 0px;
+ color: #253555;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 8px;
+ border-top-left-radius: 8px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 8px;
+ -moz-border-radius-topleft: 8px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 8px;
+ -webkit-border-top-left-radius: 8px;
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+
+}
+
+.memdoc {
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 2px 5px;
+ background-color: #FBFCFD;
+ border-top-width: 0;
+ /* opera specific markup */
+ border-bottom-left-radius: 8px;
+ border-bottom-right-radius: 8px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+.params, .retval, .exception, .tparams {
+ border-spacing: 6px 2px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+
+
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+ font-family: sans-serif;
+ margin: 0px;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+ margin: 5px;
+}
+
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice. Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+ height: 61px;
+ background-repeat: no-repeat;
+ background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+ display: none;
+}
+*/
+
+.directory > h3 {
+ margin-top: 0;
+}
+
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory div {
+ display: none;
+ margin: 0px;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+ font-size: 100%;
+ font-weight: bold;
+}
+
+.directory-alt h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+.directory-alt > h3 {
+ margin-top: 0;
+}
+
+.directory-alt p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+.directory-alt img {
+ vertical-align: -30%;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+}
+
+address {
+ font-style: normal;
+ color: #2A3D61;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+}
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ height:30px;
+ line-height:30px;
+ color:#8AA0CC;
+ border:solid 1px #C2CDE4;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color:#6884BD;
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+div.ingroups
+{
+ font-size: 8pt;
+ padding-left: 5px;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #F9FAFC;
+ margin: 0px;
+ border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
+dl
+{
+ padding: 0 0 0 10px;
+}
+
+dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
+{
+ border-left:4px solid;
+ padding: 0 0 0 6px;
+}
+
+dl.note
+{
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+ border-color: #00D000;
+}
+
+dl.deprecated
+{
+ border-color: #505050;
+}
+
+dl.todo
+{
+ border-color: #00C0E0;
+}
+
+dl.test
+{
+ border-color: #3030E0;
+}
+
+dl.bug
+{
+ border-color: #C08050;
+}
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectname
+{
+ font: 300% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font: 120% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font: 50% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid #5373B4;
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
diff --git a/docs/doxygen.png b/docs/doxygen.png
new file mode 100644
index 0000000..635ed52
Binary files /dev/null and b/docs/doxygen.png differ
diff --git a/docs/files.html b/docs/files.html
new file mode 100644
index 0000000..214ca2f
--- /dev/null
+++ b/docs/files.html
@@ -0,0 +1,93 @@
+
+
+
+
+|
+ Shell
+ |
+
| builtin.c | |
| builtin.h [código] | |
| list.c | |
| list.h [código] | |
| main.c | |
| main.h [código] | |
| Mainpage.h [código] | |
| parser.c | |
| parser.h [código] |
1.7.4
+
+
diff --git a/docs/functions.html b/docs/functions.html
new file mode 100644
index 0000000..ff2d05c
--- /dev/null
+++ b/docs/functions.html
@@ -0,0 +1,148 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/functions_vars.html b/docs/functions_vars.html
new file mode 100644
index 0000000..1ca2b3a
--- /dev/null
+++ b/docs/functions_vars.html
@@ -0,0 +1,148 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/globals.html b/docs/globals.html
new file mode 100644
index 0000000..d8200ea
--- /dev/null
+++ b/docs/globals.html
@@ -0,0 +1,351 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/globals_defs.html b/docs/globals_defs.html
new file mode 100644
index 0000000..03ac738
--- /dev/null
+++ b/docs/globals_defs.html
@@ -0,0 +1,92 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/globals_func.html b/docs/globals_func.html
new file mode 100644
index 0000000..7b0eac7
--- /dev/null
+++ b/docs/globals_func.html
@@ -0,0 +1,301 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/globals_type.html b/docs/globals_type.html
new file mode 100644
index 0000000..92a4d69
--- /dev/null
+++ b/docs/globals_type.html
@@ -0,0 +1,95 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/globals_vars.html b/docs/globals_vars.html
new file mode 100644
index 0000000..9b94934
--- /dev/null
+++ b/docs/globals_vars.html
@@ -0,0 +1,110 @@
+
+
+
+
+|
+ Shell
+ |
+
1.7.4
+
+
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..64cfa21
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,124 @@
+
+
+
+
+|
+ Shell
+ |
+
Desenvolvemos o shell utilizando 4 arquivos diferentes (e seus headers):
+No nosso programa, temos três listas ligadas diferentes que são constantemente utilizadas:
+Na nossa shell, os seguintes tipos de comando não são possíveis:
+Tornou-se uma tarefa complicada para nós lidar com essas peculiaridades de comandos builtin, já que implementamos sem elas em mente, e, quando percebemos que haveriam essas possibilidades, teríamos que mudar muito a estrutura do programa.
+Além de exaustivos testes com vários comandos complexos, rodamos nossa shell com o Valgrind e encontramos vários memory leaks (a maioria causada por erros bobos, porém alguns eram bem complexos). Arrumamos a maioria deles, mas infelizmente teve um leak que não foi possível concertar, pois ele é causado pela função getlogin(), (implementada na unistd.h).
+Além de bastante desafiador, o desenvolvimento da shell foi de grande valia para nós, já que nunca tivemos um contato a nível de sistema com o Linux. Depois do desenvolvimento desse programa, arriscamos dizer que entendemos ao menos um pouco de Linux :).
+
1.7.4
+
+
diff --git a/docs/installdox b/docs/installdox
new file mode 100755
index 0000000..edf5bbf
--- /dev/null
+++ b/docs/installdox
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+%subst = ( );
+$quiet = 0;
+
+while ( @ARGV ) {
+ $_ = shift @ARGV;
+ if ( s/^-// ) {
+ if ( /^l(.*)/ ) {
+ $v = ($1 eq "") ? shift @ARGV : $1;
+ ($v =~ /\/$/) || ($v .= "/");
+ $_ = $v;
+ if ( /(.+)\@(.+)/ ) {
+ if ( exists $subst{$1} ) {
+ $subst{$1} = $2;
+ } else {
+ print STDERR "Unknown tag file $1 given with option -l\n";
+ &usage();
+ }
+ } else {
+ print STDERR "Argument $_ is invalid for option -l\n";
+ &usage();
+ }
+ }
+ elsif ( /^q/ ) {
+ $quiet = 1;
+ }
+ elsif ( /^\?|^h/ ) {
+ &usage();
+ }
+ else {
+ print STDERR "Illegal option -$_\n";
+ &usage();
+ }
+ }
+ else {
+ push (@files, $_ );
+ }
+}
+
+foreach $sub (keys %subst)
+{
+ if ( $subst{$sub} eq "" )
+ {
+ print STDERR "No substitute given for tag file `$sub'\n";
+ &usage();
+ }
+ elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" )
+ {
+ print "Substituting $subst{$sub} for each occurrence of tag file $sub\n";
+ }
+}
+
+if ( ! @files ) {
+ if (opendir(D,".")) {
+ foreach $file ( readdir(D) ) {
+ $match = ".html";
+ next if ( $file =~ /^\.\.?$/ );
+ ($file =~ /$match/) && (push @files, $file);
+ ($file =~ /\.svg/) && (push @files, $file);
+ ($file =~ "navtree.js") && (push @files, $file);
+ }
+ closedir(D);
+ }
+}
+
+if ( ! @files ) {
+ print STDERR "Warning: No input files given and none found!\n";
+}
+
+foreach $f (@files)
+{
+ if ( ! $quiet ) {
+ print "Editing: $f...\n";
+ }
+ $oldf = $f;
+ $f .= ".bak";
+ unless (rename $oldf,$f) {
+ print STDERR "Error: cannot rename file $oldf\n";
+ exit 1;
+ }
+ if (open(F,"<$f")) {
+ unless (open(G,">$oldf")) {
+ print STDERR "Error: opening file $oldf for writing\n";
+ exit 1;
+ }
+ if ($oldf ne "tree.js") {
+ while (|
+ Shell
+ |
+
1.7.4
+
+