* @brief Adds a path to the list of paths to look for executables in * * @param path */
| 21 | * @param path |
| 22 | */ |
| 23 | void add_path(char *path) |
| 24 | { |
| 25 | paths[paths_c] = (char *)malloc(sizeof(char) * strlen(path) + 1); |
| 26 | strcpy(paths[paths_c++], path); |
| 27 | paths = realloc(paths, (paths_c + 1) * sizeof(char *)); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @brief Initializes the list of paths and adds the DEFAULT_PATH |