mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Nuked almost all trailing white space.
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
This commit is contained in:
parent
ffd099eb19
commit
b008274afd
305 changed files with 5385 additions and 5592 deletions
|
@ -49,8 +49,8 @@ struct session_environment_s
|
|||
/* A list of environment vribales we pass from the acual user
|
||||
(e.g. gpgme) down to the pinentry. We do not handle the locale
|
||||
settings because they do not only depend on envvars. */
|
||||
static struct
|
||||
{
|
||||
static struct
|
||||
{
|
||||
const char *name;
|
||||
const char *assname; /* Name used by Assuan or NULL. */
|
||||
} stdenvnames[] = {
|
||||
|
@ -64,7 +64,7 @@ static struct
|
|||
modules (eg "scim-bridge"). */
|
||||
{ "QT_IM_MODULE" }, /* Used by Qt to select qt input
|
||||
modules (eg "xim"). */
|
||||
{ "PINENTRY_USER_DATA", "pinentry-user-data"}
|
||||
{ "PINENTRY_USER_DATA", "pinentry-user-data"}
|
||||
/* Used for communication with
|
||||
non-standard Pinentries. */
|
||||
};
|
||||
|
@ -109,7 +109,7 @@ session_env_new (void)
|
|||
se = xtrycalloc (1, sizeof *se);
|
||||
if (se)
|
||||
{
|
||||
se->arraysize = (lastallocatedarraysize?
|
||||
se->arraysize = (lastallocatedarraysize?
|
||||
lastallocatedarraysize : INITIAL_ARRAYSIZE);
|
||||
se->array = xtrycalloc (se->arraysize, sizeof *se->array);
|
||||
if (!se->array)
|
||||
|
@ -132,7 +132,7 @@ session_env_release (session_env_t se)
|
|||
if (!se)
|
||||
return;
|
||||
|
||||
if (se->arraysize > INITIAL_ARRAYSIZE
|
||||
if (se->arraysize > INITIAL_ARRAYSIZE
|
||||
&& se->arraysize <= MAXDEFAULT_ARRAYSIZE
|
||||
&& se->arraysize > lastallocatedarraysize)
|
||||
lastallocatedarraysize = se->arraysize;
|
||||
|
@ -249,7 +249,7 @@ gpg_error_t
|
|||
session_env_putenv (session_env_t se, const char *string)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
|
||||
if (!string || !*string)
|
||||
return gpg_error (GPG_ERR_INV_VALUE);
|
||||
s = strchr (string, '=');
|
||||
|
@ -325,7 +325,7 @@ session_env_getenv_or_default (session_env_t se, const char *name,
|
|||
*r_default = 1;
|
||||
return se->array[idx]->value;
|
||||
}
|
||||
|
||||
|
||||
/* Get the default value with an additional fallback for GPG_TTY. */
|
||||
defvalue = getenv (name);
|
||||
if ((!defvalue || !*defvalue) && !strcmp (name, "GPG_TTY") && ttyname (0))
|
||||
|
@ -339,7 +339,7 @@ session_env_getenv_or_default (session_env_t se, const char *name,
|
|||
explicit error anyway and the following scan would then fail
|
||||
anyway. */
|
||||
update_var (se, name, strlen (name), defvalue, 1);
|
||||
|
||||
|
||||
for (idx=0; idx < se->arrayused; idx++)
|
||||
if (se->array[idx] && !strcmp (se->array[idx]->name, name))
|
||||
{
|
||||
|
@ -359,7 +359,7 @@ session_env_getenv_or_default (session_env_t se, const char *name,
|
|||
R_DEFAULT is not NULL, the default flag is stored on return. The
|
||||
default flag indicates that the value has been taken from the
|
||||
process' environment. The caller must not change the returned
|
||||
name or value. */
|
||||
name or value. */
|
||||
char *
|
||||
session_env_listenv (session_env_t se, int *iterator,
|
||||
const char **r_value, int *r_default)
|
||||
|
@ -381,5 +381,3 @@ session_env_listenv (session_env_t se, int *iterator,
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue