Browse Source

Manpage init, minor fixes

master
Apostolos Fanakis 7 years ago
parent
commit
d453d1d343
  1. BIN
      Project.pdf
  2. 1
      apostolofShellFunctions.c
  3. 2
      apostolofShellFunctions.h
  4. 12
      apostolofShellManpage

BIN
Project.pdf

Binary file not shown.

1
apostolofShellFunctions.c

@ -179,6 +179,7 @@ void parseCommand(char *input, char **command, char ***argv, int *argc){
//Checks if argument is wrapped inside " or ' characters //Checks if argument is wrapped inside " or ' characters
if ( (token[0] == '"' && token[strlen(token) - 1] == '"' ) || if ( (token[0] == '"' && token[strlen(token) - 1] == '"' ) ||
(token[0] == '\'' && token[strlen(token) - 1] == '\'' ) ){ (token[0] == '\'' && token[strlen(token) - 1] == '\'' ) ){
//Deletes wrapper characters
token++; token++;
token[strlen(token) - 1] = '\0'; token[strlen(token) - 1] = '\0';

2
apostolofShellFunctions.h

@ -38,7 +38,7 @@ void parseCommand(char *input, //String to be parsed
char ***argv, //NULL terminated string array containing command's arguments char ***argv, //NULL terminated string array containing command's arguments
int *argc); //Number of arguments int *argc); //Number of arguments
//Function trimWhitespaces trims leading and trailing whitespaces of a string //Function trimWhitespaces trims leading and trailing whitespace of a string
char *trimWhitespaces(char *string); //String to be trimmed char *trimWhitespaces(char *string); //String to be trimmed
#endif // APOSTOLOFSHELLFUNCTIONS_H_ #endif // APOSTOLOFSHELLFUNCTIONS_H_

12
apostolofShellManpage

@ -0,0 +1,12 @@
.TH apostolofShell 1 "9/2/2018" "1.0" "apostolofShell man page"
.SH NAME
apostolofShell \- a simple unix shell implementation
.SH SYNOPSIS
apostolofShell
.OP file
.SH DESCRIPTION
Start a unix shell. Default mode is interactive. Specify a script file to use in batch mode.
.SH OPTIONS
The apostolofShell does not take any options.
.SH AUTHOR
Apostolof (apotwohd@gmail.com)
Loading…
Cancel
Save