getconf is a C program that can retrieve NAME=VALUE pairs from a configuration file.. #Retrieve NAME #Retrieve VALUE #Configuration file #Getconf #Retrieve #NAME
getconf is a C program that can retrieve NAME=VALUE pairs from a configuration file.
#include < stdio.h > #include < stdlib.h > #include < string.h > #include "getconf.h"
int main( int argc, char *argv[] ) { struct config c; char *vars[MAX_LINES]; char *vals[MAX_LINES]; char *configfile = "getconf_test.conf"; int lines; int count;
lines = open_file( configfile ); if ( lines < 0 ) { fprintf( stderr, "Could not read config file %sn", configfile ); exit( EXIT_FAILURE ); }
get_config( &c );
for ( count = 0 ; count < lines ; count++ ) { *(vars+count)=(char *)malloc(strlen(c.var[count])); *(vals+count)=(char *)malloc(strlen(c.val[count])); strcpy( *(vars+count), c.var[count] ); strcpy( *(vals+count), c.val[count] ); printf( "Variable: %sttValue: %sn", *(vars+count), *(vals+count) ); }
/* now cleanup */ for ( count = 0 ; count < lines ; count++ ) { free( vars[count] ); free( vals[count] ); } return 0; }
getconf 0.1
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- getconf.tar.gz
- main category:
- Utilities
- developer:
- visit homepage
ShareX 16.0.1
calibre 7.9.0
Bitdefender Antivirus Free 27.0.35.146
IrfanView 4.67
Zoom Client 6.0.3.37634
Context Menu Manager 3.3.3.1
Windows Sandbox Launcher 1.0.0
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
7-Zip 23.01 / 24.04 Beta
- 4k Video Downloader
- Microsoft Teams
- 7-Zip
- ShareX
- calibre
- Bitdefender Antivirus Free
- IrfanView
- Zoom Client
- Context Menu Manager
- Windows Sandbox Launcher