#include "attributes.h"
#include <stdbool.h>
#include <string.h>
Go to the source code of this file.
|
#define | PATH_MAX 4096 |
| Maximum length of a file name.
|
◆ PATH_MAX
Maximum length of a file name.
◆ get_file_name()
LibraryDefined const char * get_file_name |
( |
const char *const | full_path | ) |
|
This function doesn't allocate any memory on the heap. Its return value is a pointer to a part of the full_path.
Example:
LibraryDefined const char * get_file_name(const char *const full_path)
Definition filenames.h:59
- Parameters
-
full_path | Full path to file |
- Returns
- pointer to the last part of ‹full_path›
◆ get_prog_name()
Fetches the name of the program currently being run.
- Returns
- Pointer to a static buffer
◆ set_prog_name()
Sets the static ProgName buffer to the current program's name if possible.
- Returns
- false if not successful
◆ ProgName
Static buffer for saving the program name.
If all efforts to set it to the actual name, it defaults to "current-program"