libgimpprint API Reference: path.c File Reference

Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

# src/main/path.c File Reference

`#include <gimp-print/gimp-print.h>`
`#include "gimp-print-internal.h"`
`#include <gimp-print/gimp-print-intl-internal.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <dirent.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <unistd.h>`

Go to the source code of this file.

## Defines
#define | _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
#define | _D_ALLOC_NAMLEN(d)
## Functions
int | stpi_path_check (const struct dirent *module)
char * | stpi_path_merge (const char *path, const char *file)
int | stpi_scandir (const char *dir, struct dirent ***namelist, int(*sel)(const struct dirent *), int(*cmp)(const void *, const void *))
int | dirent_sort (const void *a, const void *b)
stp_list_t * | stp_path_search (stp_list_t *dirlist, const char *suffix)
void | stp_path_split (stp_list_t *list, const char *path)
## Variables
const char * | path_check_path
const char * | path_check_suffix

## Define Documentation

#define _D_ALLOC_NAMLEN | ( | d |  | ) |

| Value:
    (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
                                   _D_EXACT_NAMLEN (d) + 1)
Definition at line 239 of file path.c. Referenced by stpi_scandir().

#define _D_EXACT_NAMLEN | ( | d |  | ) | (strlen ((d)->d_name))

| Definition at line 233 of file path.c.

## Function Documentation

int dirent_sort | ( | const void * | a,
|  | const void * | b
| ) | `[static]`

| Definition at line 49 of file path.c. Referenced by stp_path_search().

stp_list_t* stp_path_search | ( | stp_list_t * | dirlist,
|  | const char * | suffix
| ) |

| Definition at line 61 of file path.c. References dirent_sort(), path_check_path, path_check_suffix, STP_DBG_PATH, stp_deprintf(), stp_list_create(), stp_list_get_start(), stp_list_item_create(), stp_list_item_get_data(), stp_list_item_next(), stp_list_item_t, stp_list_node_free_data(), stp_list_set_freefunc(), stp_list_t, stpi_path_check(), stpi_path_merge(), and stpi_scandir(). Referenced by stp_module_load(), and stp_xml_parse_file_named().

void stp_path_split | ( | stp_list_t * | list,
|  | const char * | path
| ) |

| Definition at line 177 of file path.c. References stp_list_item_create(), stp_list_t, and stp_malloc(). Referenced by stp_module_load(), and stp_xml_parse_file_named().

int stpi_path_check | ( | const struct dirent * | module | ) | `[static]`

| Definition at line 111 of file path.c. References path_check_path, path_check_suffix, STP_DBG_PATH, stp_deprintf(), stp_free(), and stpi_path_merge(). Referenced by stp_path_search().

char * stpi_path_merge | ( | const char * | path,
|  | const char * | file
| ) | `[static]`

| Definition at line 158 of file path.c. References stp_malloc(). Referenced by stp_path_search(), and stpi_path_check().

int stpi_scandir | ( | const char * | dir,
|  | struct dirent *** | namelist,
|  | int(* | sel)(const struct dirent *),
|  | int(* | cmp)(const void *, const void *)
| ) | `[static]`

| Definition at line 249 of file path.c. References _D_ALLOC_NAMLEN. Referenced by stp_path_search().

## Variable Documentation

const char* path_check_path`[static]`

| Definition at line 44 of file path.c. Referenced by stp_path_search(), and stpi_path_check().

const char* path_check_suffix`[static]`

| Definition at line 45 of file path.c. Referenced by stp_path_search(), and stpi_path_check().