continue to fill readme with external functions
This commit is contained in:
153
README.md
153
README.md
@@ -1,81 +1,82 @@
|
|||||||
## external functions :
|
## 2. external functions :
|
||||||
---
|
---
|
||||||
### readline :
|
### readline :
|
||||||
- readline
|
- **readline** : `char *readline (const char *prompt);` will read a line from the terminal and return it, using prompt as a prompt
|
||||||
- rl_clear_history
|
- **rl_clear_history** : ` `
|
||||||
- rl_on_new_line
|
- **rl_on_new_line** : ` `
|
||||||
- rl_replace_line
|
- **rl_replace_line** : ` `
|
||||||
- rl_redisplay
|
- **rl_redisplay** : ` `
|
||||||
- add_history
|
- **add_history** : ` `
|
||||||
### files :
|
### files :
|
||||||
- access
|
- **access** : `int access(const char *pathname, int mode);` checks whether the calling process can access the file pathname
|
||||||
- open
|
- **open** : `int open(const char *pathname, int flags, [mode_t mode]);` system call opens the file specified by pathname
|
||||||
- read
|
- **read** : `ssize_t read(int fd, void *buf, size_t count);` attempts to read up to count bytes from file descriptor fd into the buffer starting at buf
|
||||||
- close
|
- **close** : `int close(int fd);` closes a file descriptor, so that it no longer refers to any file and may be reused
|
||||||
- dup
|
- **dup** : `int dup(int oldfd);` creates a copy of the file descriptor oldfd, using the lowest-numbered unused file descriptor for the new descriptor
|
||||||
- dup2
|
- **dup2** : `int dup2(int oldfd, int newfd);` performs the same task as dup(), but instead of using the lowest-numbered unused file descriptor, it uses the file descriptor number specified in newfd
|
||||||
- pipe
|
- **pipe** : `int pipe(int pipefd[2]);` creates a pipe, a unidirectional data channel that can be used for interprocess communication. The array pipefd is used to return two file descriptors referring to the ends of the pipe. pipefd[0] refers to the read end of the pipe. pipefd[1] refers to the write end of the pipe
|
||||||
- stat : `int stat(const char *pathname, struct stat *statbuf);` returns information about a file, in the buffer pointed to by statbuf
|
- **stat** : `int stat(const char *pathname, struct stat *statbuf);` returns information about a file, in the buffer pointed to by statbuf
|
||||||
- lstat : `int fstat(int fd, struct stat *statbuf);` lstat() is identical to stat(), except that if pathname is a symbolic link, then it returns information about the link itself, not the file that it refers to
|
- **lstat** : `int fstat(int fd, struct stat *statbuf);` lstat() is identical to stat(), except that if pathname is a symbolic link, then it returns information about the link itself, not the file that it refers to
|
||||||
- fstat : `int lstat(const char *pathname, struct stat *statbuf);` fstat() is identical to stat(), except that the file about which information is to be retrieved is specified by the file descriptor fd
|
- **fstat** : `int lstat(const char *pathname, struct stat *statbuf);` fstat() is identical to stat(), except that the file about which information is to be retrieved is specified by the file descriptor fd
|
||||||
- unlink : `int unlink(const char *pathname);` unlink() deletes a name from the filesystem
|
- **unlink** : `int unlink(const char *pathname);` unlink() deletes a name from the filesystem
|
||||||
### process :
|
### process :
|
||||||
- fork
|
- **fork** : ` `
|
||||||
- wait
|
- **wait** : ` `
|
||||||
- waitpid
|
- **waitpid** : ` `
|
||||||
- wait3
|
- **wait3** : ` `
|
||||||
- wait4
|
- **wait4** : ` `
|
||||||
- exit
|
- **exit** : ` `
|
||||||
### signals :
|
### signals :
|
||||||
- signal
|
- **signal** : ` `
|
||||||
- sigaction
|
- **sigaction** : ` `
|
||||||
- kill
|
- **kill** : ` `
|
||||||
### directories :
|
### directories :
|
||||||
- getcwd : `char *getcwd(char *buf, size_t size);` returns a null-terminated string containing an absolute pathname that is the current working directory of the calling process
|
- **getcwd** : `char *getcwd(char *buf, size_t size);` returns a null-terminated string containing an absolute pathname that is the current working directory of the calling process
|
||||||
- chdir : `int chdir(const char *path);` changes the current working directory of the calling process to the directory specified in path
|
- **chdir** : `int chdir(const char *path);` changes the current working directory of the calling process to the directory specified in path
|
||||||
- execve : `int execve(const char *filename, char *const argv[], char *const envp[]);` executes the program pointed to by filename
|
- **execve** : `int execve(const char *filename, char *const argv[], char *const envp[]);` executes the program pointed to by filename
|
||||||
- opendir : `DIR *opendir(const char *name);` opens a directory stream corresponding to the directory name, and returns a pointer to the directory stream
|
- **opendir** : `DIR *opendir(const char *name);` opens a directory stream corresponding to the directory name, and returns a pointer to the directory stream
|
||||||
- readdir : `struct dirent *readdir(DIR *dirp);` returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp
|
- **readdir** : `struct dirent *readdir(DIR *dirp);` returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp
|
||||||
- closedir : `int closedir(DIR *dirp);` closes the directory stream associated with dirp
|
- **closedir** : `int closedir(DIR *dirp);` closes the directory stream associated with dirp
|
||||||
### errors :
|
### errors :
|
||||||
- strerror : `char *strerror(int errnum);` returns a pointer to a string that describes the error code passed in the argument errnum
|
- **strerror** : `char *strerror(int errnum);` returns a pointer to a string that describes the error code passed in the argument errnum
|
||||||
- perror : `void perror(const char *s);` produces a message on standard error describing the last error encountered during a call to a system or library function
|
- **perror** : `void perror(const char *s);` produces a message on standard error describing the last error encountered during a call to a system or library function
|
||||||
### other :
|
### other :
|
||||||
- printf
|
- **printf** : ` `
|
||||||
- malloc
|
- **malloc** : ` `
|
||||||
- free
|
- **free** : ` `
|
||||||
- write
|
- **write** : ` `
|
||||||
|
|
||||||
- isatty
|
- **isatty** : ` `
|
||||||
- ttyname
|
- **ttyname** : ` `
|
||||||
- ttyslot
|
- **ttyslot** : ` `
|
||||||
- ioctl
|
- **ioctl** : ` `
|
||||||
- getenv
|
- **getenv** : ` `
|
||||||
- tcsetattr
|
- **tcsetattr** : ` `
|
||||||
- tcgetattr
|
- **tcgetattr** : ` `
|
||||||
- tgetent
|
- **tgetent** : ` `
|
||||||
- tgetflag
|
- **tgetflag** : ` `
|
||||||
- tgetnum
|
- **tgetnum** : ` `
|
||||||
- tgetstr
|
- **tgetstr** : ` `
|
||||||
- tgoto
|
- **tgoto** : ` `
|
||||||
- tputs
|
- **tputs** : ` `
|
||||||
|
|
||||||
|
|
||||||
## sommaire :
|
## sommaire :
|
||||||
---
|
---
|
||||||
- [1. todo list :](#markdown-header-1-todo-list)
|
- [1. todo list :](#markdown-header-1-todo-list)
|
||||||
- [2. parsing :](#markdown-header-2-parsing)
|
- [2. external functions :](#markdown-header-2-external-functions)
|
||||||
- [2.1. methode arbre binaire :](#markdown-header-21-methode-arbre-binaire)
|
- [3. parsing :](#markdown-header-3-parsing)
|
||||||
- [3. gerer les quotes et la separation des arguments :](#markdown-header-3-gerer-les-quotes-et-la-separation-des-arguments)
|
- [3.1. methode arbre binaire :](#markdown-header-31-methode-arbre-binaire)
|
||||||
- [3.1. tentative methode 1 :](#markdown-header-31-tentative-methode-1)
|
- [4. gerer les quotes et la separation des arguments :](#markdown-header-4-gerer-les-quotes-et-la-separation-des-arguments)
|
||||||
- [3.1.1. pseudo code :](#markdown-header-311-pseudo-code)
|
- [4.1. tentative methode 1 :](#markdown-header-41-tentative-methode-1)
|
||||||
- [3.1.2. application :](#markdown-header-312-application)
|
- [4.1.1. pseudo code :](#markdown-header-411-pseudo-code)
|
||||||
- [3.1.3. erreur :](#markdown-header-313-erreur)
|
- [4.1.2. application :](#markdown-header-412-application)
|
||||||
- [3.2. tentative methode 2 :](#markdown-header-32-tentative-methode-2)
|
- [4.1.3. erreur :](#markdown-header-413-erreur)
|
||||||
- [3.2.1. deroulement :](#markdown-header-321-deroulement)
|
- [4.2. tentative methode 2 :](#markdown-header-42-tentative-methode-2)
|
||||||
- [3.2.2. application :](#markdown-header-322-application)
|
- [4.2.1. deroulement :](#markdown-header-421-deroulement)
|
||||||
- [3.3. comportement reel chelou :](#markdown-header-33-comportement-reel-chelou)
|
- [4.2.2. application :](#markdown-header-422-application)
|
||||||
- [4. notes :](#markdown-header-4-notes)
|
- [4.3. comportement reel chelou :](#markdown-header-43-comportement-reel-chelou)
|
||||||
|
- [5. notes :](#markdown-header-5-notes)
|
||||||
|
|
||||||
## 1. todo list :
|
## 1. todo list :
|
||||||
---
|
---
|
||||||
@@ -119,10 +120,10 @@
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
## 2. parsing :
|
## 3. parsing :
|
||||||
---
|
---
|
||||||
|
|
||||||
### 2.1 methode arbre binaire :
|
### 3.1 methode arbre binaire :
|
||||||
|
|
||||||
[transformer arbre normal en arbre binaire](https://fr.wikipedia.org/wiki/Arbre_binaire#Transformation_d'un_arbre_quelconque_en_un_arbre_binaire)
|
[transformer arbre normal en arbre binaire](https://fr.wikipedia.org/wiki/Arbre_binaire#Transformation_d'un_arbre_quelconque_en_un_arbre_binaire)
|
||||||
|
|
||||||
@@ -156,12 +157,12 @@ EXEMPLE : . .
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
## 3. gerer les quotes et la separation des arguments :
|
## 4. gerer les quotes et la separation des arguments :
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3.1 tentative methode 1 :
|
### 4.1 tentative methode 1 :
|
||||||
|
|
||||||
#### 3.1.1 pseudo code :
|
#### 4.1.1 pseudo code :
|
||||||
```text
|
```text
|
||||||
q = 0 // first quote
|
q = 0 // first quote
|
||||||
c = 0 // count
|
c = 0 // count
|
||||||
@@ -210,7 +211,7 @@ while (str[i])
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
#### 3.1.2 application :
|
#### 4.1.2 application :
|
||||||
```text
|
```text
|
||||||
['][a][r][g][1][ ]['][a][r][g][2]["][ ][a][r][g][3]["]
|
['][a][r][g][1][ ]['][a][r][g][2]["][ ][a][r][g][3]["]
|
||||||
c = 0 . . . . . . . . . . . . . . . . . .
|
c = 0 . . . . . . . . . . . . . . . . . .
|
||||||
@@ -253,7 +254,7 @@ c = . . . . . . . . . 0 str[i] != ' | " ; ->
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
#### 3.1.3 erreur :
|
#### 4.1.3 erreur :
|
||||||
-> comment le programme sait que cette fois il doit decrementer "c" ?
|
-> comment le programme sait que cette fois il doit decrementer "c" ?
|
||||||
en retenant dans l'ordre toutes les dernieres valeurs de "q" !
|
en retenant dans l'ordre toutes les dernieres valeurs de "q" !
|
||||||
|
|
||||||
@@ -261,9 +262,9 @@ c = . . . . . . . . . 0 str[i] != ' | " ; ->
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
### 3.2 tentative methode 2 :
|
### 4.2 tentative methode 2 :
|
||||||
|
|
||||||
#### 3.2.1 deroulement :
|
#### 4.2.1 deroulement :
|
||||||
```text
|
```text
|
||||||
.--------------------------------------------.
|
.--------------------------------------------.
|
||||||
: .--------------------------------------. :
|
: .--------------------------------------. :
|
||||||
@@ -291,7 +292,7 @@ c = . . . . . . . . . 0 str[i] != ' | " ; ->
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
#### 3.2.2 application :
|
#### 4.2.2 application :
|
||||||
```text
|
```text
|
||||||
.--.
|
.--.
|
||||||
1 : '__"__'__"__"__"__'__'__"__"__'__'__"__'__"__'
|
1 : '__"__'__"__"__"__'__'__"__"__'__'__"__'__"__'
|
||||||
@@ -321,7 +322,7 @@ c = . . . . . . . . . 0 str[i] != ' | " ; ->
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
### 3.3 comportement reel chelou :
|
### 4.3 comportement reel chelou :
|
||||||
```text
|
```text
|
||||||
echo "_"
|
echo "_"
|
||||||
_
|
_
|
||||||
@@ -366,7 +367,7 @@ _'___"___'___"_"___'___"___'_
|
|||||||
|
|
||||||
*[\go to sommaire](#markdown-header-sommaire)*
|
*[\go to sommaire](#markdown-header-sommaire)*
|
||||||
|
|
||||||
## 4. notes :
|
## 5. notes :
|
||||||
---
|
---
|
||||||
|
|
||||||
Ordre Interpreteur :
|
Ordre Interpreteur :
|
||||||
|
|||||||
Reference in New Issue
Block a user