#include "system.h"
#include <rpmio.h>
#include <rpmlog.h>
#include <rpmurl.h>
#include <rpmmacro.h>
#include <rpmlib.h>
#include "misc.h"
#include <string.h>
#include "debug.h"
Go to the source code of this file.
Functions | |
rpmRC | rpmMkdirPath (const char *dpath, const char *dname) |
Create directory if it does not exist, and make sure path is writable. | |
char ** | splitString (const char *str, int length, char sep) |
Split string into fields separated by a character. | |
void | freeSplitString (char **list) |
Free split string argv array. | |
int | doputenv (const char *str) |
Like the libc function, but malloc()'s the space needed. | |
int | dosetenv (const char *name, const char *value, int overwrite) |
Like the libc function, but malloc()'s the space needed. | |
char * | currentDirectory (void) |
Return (malloc'd) current working directory. | |
Variables | |
const char * | RPMVERSION = VERSION |
Definition in file misc.c.
char* currentDirectory | ( | void | ) |
Return (malloc'd) current working directory.
Definition at line 116 of file misc.c.
References errno, and xrealloc().
Referenced by rpmQueryVerify(), and rpmtsRun().
int doputenv | ( | const char * | str | ) |
Like the libc function, but malloc()'s the space needed.
str | "name=value" string |
Definition at line 94 of file misc.c.
References xmalloc().
Referenced by runScript().
int dosetenv | ( | const char * | name, | |
const char * | value, | |||
int | overwrite | |||
) |
void freeSplitString | ( | char ** | list | ) |
Free split string argv array.
list | argv array |
Definition at line 86 of file misc.c.
References _free().
Referenced by parsePrep(), processPackageFiles(), processSourceFiles(), and skipFiles().
rpmRC rpmMkdirPath | ( | const char * | dpath, | |
const char * | dname | |||
) |
Create directory if it does not exist, and make sure path is writable.
dpath | directory path | |
dname | directory use string |
Definition at line 18 of file misc.c.
References _, errno, Mkdir(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, Stat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
Referenced by prepFetch(), rpmInstallSourcePackage(), and rpmpsmStage().
char** splitString | ( | const char * | str, | |
int | length, | |||
char | sep | |||
) |
Split string into fields separated by a character.
str | string | |
length | length of string | |
sep | separator character |
Definition at line 48 of file misc.c.
References xmalloc().
Referenced by parsePrep(), processPackageFiles(), processSourceFiles(), and skipFiles().
const char* RPMVERSION = VERSION |
Definition at line 8 of file misc.c.
Referenced by rpmcliImportPubkey(), and rpmtsImportPubkey().