solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
Macros | Functions
dotenv.h File Reference

Environment variable loading from .env files. More...

#include "env.h"
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for dotenv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_VAR_NAME_LEN   256
 

Functions

bool load_dotenv (const char *path)
 

Detailed Description

Environment variable loading from .env files.

Definition in file dotenv.h.

Macro Definition Documentation

◆ MAX_VAR_NAME_LEN

#define MAX_VAR_NAME_LEN   256

Maximum length of an environment variable name.

Definition at line 23 of file dotenv.h.

Function Documentation

◆ load_dotenv()

bool load_dotenv ( const char *  path)

Load .env file and populate set environment variables from the file. Supports variable expansion with syntax but the variables must be defined before being used.

Parameters
pathThe path to the .env file. Must not be NULL.
Returns
bool Returns true on success, false otherwise.

Definition at line 157 of file dotenv.c.

References load_dotenv().

Referenced by load_dotenv().

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