|
ginnOS
The reference: libc, the libraries and the kernel
|
libapps: read the .app files of the desktop's programs. More...
#include "apps.h"#include "conf.h"#include <ctype.h>#include <dirent.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>Macros | |
| #define | SUFFIX ".app" |
| #define | SECTION "app" |
| #define | PATH_LEN 256 |
| #define | ID_MAX_LEN 64 |
| #define | CATEGORY_COUNT ((int)(sizeof(categories) / sizeof(categories[0]))) |
Functions | |
| void | apps_free (app_list_t *list) |
| app_list_t * | apps_load (const char *dir) |
| read the .app files of a directory (APPS_DIR for the system ones). | |
| const app_t * | apps_find (const app_list_t *list, const char *id) |
| the program with this id. | |
| int | app_split_exec (const char *exec, char *buffer, char *argv[APP_ARGS_MAX+1]) |
| split exec into words. | |
libapps: read the .app files of the desktop's programs.
| #define SUFFIX ".app" |
| #define SECTION "app" |
| #define PATH_LEN 256 |
| #define ID_MAX_LEN 64 |
| #define CATEGORY_COUNT ((int)(sizeof(categories) / sizeof(categories[0]))) |
| void apps_free | ( | app_list_t * | list | ) |
| app_list_t * apps_load | ( | const char * | dir | ) |
read the .app files of a directory (APPS_DIR for the system ones).
a file without a name or exec is skipped, with a warning on stderr.
| const app_t * apps_find | ( | const app_list_t * | list, |
| const char * | id ) |
the program with this id.
| int app_split_exec | ( | const char * | exec, |
| char * | buffer, | ||
| char * | argv[APP_ARGS_MAX+1] ) |
split exec into words.
| buffer | receives the words (it must hold strlen(exec) + 1 bytes). |
| argv | receives up to APP_ARGS_MAX words and a NULL. |