Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SHTK_CONFIG_LOAD(3)    FreeBSD Library Functions Manual	   SHTK_CONFIG_LOAD(3)

NAME
     shtk_config_load -- Loads a configuration file

LIBRARY
     shtk_import config

SYNOPSIS
     shtk_config_load config_file

DESCRIPTION
     The shtk_config_load function parses and loads the	configuration file
     given by config_file.

     Only the configuration variables previously registered as valid with a
     call to shtk_config_init(3) will be recognized as valid variables during
     load.  Any	variables defined by the configuration file but	not registered
     in	the shtk_config_load module will be ignored during load.

EXAMPLES
     Consider the following configuration file:

	   prefix=/usr
	   OBJDIR="${prefix}/obj"
	   SRCDIR="${prefix}/src"

     The following piece of code illustrates how to load and display the set-
     tings of the file above:

	   shtk_config_init OBJDIR SRCDIR
	   shtk_config_load ".../path/to/the/file/above.conf"

	   echo	"prefix	was defined but	is not available:" \
	       "$(shtk_config_get_default prefix default-value)"
	   echo	"OBJDIR	is $(shtk_config_get OBJDIR)"
	   echo	"SRCDIR	is $(shtk_config_get SRCDIR)"

ERRORS
     Errors during the processing of config_file result	in the termination of
     the caller	script.

SEE ALSO
     shtk(3), shtk_config(3)

HISTORY
     shtk_config_load first appeared in	shtk 1.0.

FreeBSD	13.0		       November	6, 2014			  FreeBSD 13.0

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | EXAMPLES | ERRORS | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=shtk_config_load&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help