Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_out
4 changes: 4 additions & 0 deletions doc/nvidia-settings.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Comment[ru]=Конфигурирование параметров NVIDIA X Serve
Name[ro]=Setări NVIDIA X Server
Comment[ro]=Configurează setările NVIDIA X Server

# Translation by Obiwac
Name[nl]=NVIDIA X-Server-Instellingen
Comment[nl]=Configuratie van NVIDIA X-Server-Instellingen

# Translations provided by Sun Microsystems
Name[de]=NVIDIA X-Server-Einstellungen
Name[es]=Valores de configuración del servidor NVIDIA X
Expand Down
29 changes: 15 additions & 14 deletions src/XF86Config-parser/Util.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses>.
*
Expand All @@ -31,14 +31,14 @@
void *xconfigAlloc(size_t size)
{
void *m = malloc(size);

if (!m) {
fprintf(stderr, "memory allocation failure (%s)! \n", strerror(errno));
exit(1);
}
memset((char *) m, 0, size);
return m;

} /* xconfigAlloc() */


Expand All @@ -55,14 +55,14 @@ char *xconfigStrdup(const char *s)
if (!s) return NULL;

m = strdup(s);

if (!m) {
fprintf(stderr, "memory allocation failure during strdup (%s)! \n",
strerror(errno));
exit(1);
}
return m;

} /* xconfigStrdup() */


Expand All @@ -77,7 +77,7 @@ char *xconfigStrcat(const char *str, ...)
va_list args;
char *s;
char *concat;

l = 1 + strlen(str);
va_start(args, str);
s = va_arg(args, char *);
Expand All @@ -87,10 +87,10 @@ char *xconfigStrcat(const char *str, ...)
s = va_arg(args, char *);
}
va_end(args);

concat = xconfigAlloc(l);
concat[0] = 0;

strcat(concat, str);
va_start(args, str);
s = va_arg(args, char *);
Expand All @@ -99,7 +99,7 @@ char *xconfigStrcat(const char *str, ...)
s = va_arg(args, char *);
}
va_end(args);

return concat;

} /* xconfigStrcat() */
Expand All @@ -115,6 +115,7 @@ extern int configLineNo;
extern char *configSection;
extern char *configPath;

__attribute__((__format__(__printf__, 2, 0)))
void xconfigErrorMsg(MsgType t, char *fmt, ...)
{
va_list ap;
Expand All @@ -123,7 +124,7 @@ void xconfigErrorMsg(MsgType t, char *fmt, ...)
char scratch[64];

b = xconfigAlloc(current_len);

while (1) {
va_start(ap, fmt);
len = vsnprintf(b, current_len, fmt, ap);
Expand Down Expand Up @@ -162,18 +163,18 @@ void xconfigErrorMsg(MsgType t, char *fmt, ...)
case DebugMsg: break;
case UnknownMsg: break;
}

if (pre) {
msg = xconfigStrcat(pre, b, NULL);
} else {
msg = strdup(b);
}

/* call back into the host to print the message */

xconfigPrint(t, msg);


free(b);
free(msg);
if (pre) free(pre);
Expand Down
3 changes: 2 additions & 1 deletion src/gtk+-2.x/ctkappprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ static void edit_profile_dialog_settings_new_row(GtkTreeView *tree_view,
get_default_json_from_type(expected_type));

gtk_list_store_append(GTK_LIST_STORE(tree_model), &iter);
gtk_list_store_set(GTK_LIST_STORE(tree_model), &iter,
gtk_list_store_set(GTK_LIST_STORE(tree_model), &iter,
SETTING_LIST_STORE_COL_SETTING, setting, -1);

*path = gtk_tree_model_get_path(tree_model, &iter);
Expand Down Expand Up @@ -2678,6 +2678,7 @@ static void get_profile_dialog_toolbar_items(EditProfileDialog *dialog,
*num_dialog_items = ARRAY_LEN(dialog_items);
}

__attribute__((__format__(printf, 2, 0)))
static void edit_profile_dialog_statusbar_message(EditProfileDialog *dialog,
const char *fmt, ...)
{
Expand Down
Loading