NetSurf
Macros | Functions | Variables
findfile.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/filepath.h"
#include "utils/log.h"
#include "framebuffer/findfile.h"
Include dependency graph for findfile.c:

Go to the source code of this file.

Macros

#define MAX_LANGV_SIZE   32
 resource search path vector More...
 

Functions

static const char * get_language_env (void)
 goes through the environment in appropriate order to find configured language More...
 
static char ** get_language_names (void)
 build a string vector of language names More...
 
char ** fb_init_resource_path (const char *resource_path)
 Create an array of valid paths to search for resources. More...
 

Variables

char ** respaths
 resource search path vector More...
 

Macro Definition Documentation

◆ MAX_LANGV_SIZE

#define MAX_LANGV_SIZE   32

resource search path vector

Definition at line 30 of file findfile.c.

Function Documentation

◆ fb_init_resource_path()

char ** fb_init_resource_path ( const char *  resource_path)

Create an array of valid paths to search for resources.

The idea is that all the complex path computation to find resources is performed here, once, rather than every time a resource is searched for.

Definition at line 131 of file findfile.c.

References filepath_free_strvec(), filepath_generate(), filepath_path_to_strvec(), and get_language_names().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_language_env()

static const char * get_language_env ( void  )
static

goes through the environment in appropriate order to find configured language

Returns
language to use or "C" if nothing appropriate is set

Definition at line 37 of file findfile.c.

Referenced by get_language_names().

Here is the caller graph for this function:

◆ get_language_names()

static char ** get_language_names ( void  )
static

build a string vector of language names

Definition at line 67 of file findfile.c.

References get_language_env(), and MAX_LANGV_SIZE.

Referenced by fb_init_resource_path().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ respaths

char** respaths

resource search path vector

Definition at line 28 of file findfile.c.

Referenced by fb_new_face().