Commit bda6939c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/batch.c app/general.c app/core/gimpbrushgenerated.c

2002-02-10  Sven Neumann  <sven@gimp.org>

	* app/batch.c
	* app/general.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdata.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c: don't include ctype.h, use g_ascii_*
	functions from GLib instead.

	* app/gui/file-open-dialog.c: disabled multiple selection in the
	file open dialog until this is fixed in GTK+.
parent 859829d4
2002-02-10 Sven Neumann <sven@gimp.org>
* app/batch.c
* app/general.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpdata.c
* app/file/file-open.c
* app/file/file-save.c
* app/file/file-utils.c: don't include ctype.h, use g_ascii_*
functions from GLib instead.
* app/gui/file-open-dialog.c: disabled multiple selection in the
file open dialog until this is fixed in GTK+.
2002-02-10 Adam D. Moss <adam@gimp.org> 2002-02-10 Adam D. Moss <adam@gimp.org>
   
* app/core/gimpimage-convert.[ch]: * app/core/gimpimage-convert.[ch]:
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -362,7 +361,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -362,7 +361,7 @@ gimp_brush_pipe_load (const gchar *filename)
return NULL; return NULL;
} }
while (*paramstring && isspace (*paramstring)) while (*paramstring && g_ascii_isspace (*paramstring))
paramstring++; paramstring++;
if (*paramstring) if (*paramstring)
...@@ -442,7 +441,8 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -442,7 +441,8 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."), filename); g_message (_("Fatal parsing error:\n"
"Brush pipe file '%s' is corrupt."), filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
return NULL; return NULL;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -362,7 +361,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -362,7 +361,7 @@ gimp_brush_pipe_load (const gchar *filename)
return NULL; return NULL;
} }
while (*paramstring && isspace (*paramstring)) while (*paramstring && g_ascii_isspace (*paramstring))
paramstring++; paramstring++;
if (*paramstring) if (*paramstring)
...@@ -442,7 +441,8 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -442,7 +441,8 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."), filename); g_message (_("Fatal parsing error:\n"
"Brush pipe file '%s' is corrupt."), filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
return NULL; return NULL;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -305,7 +304,7 @@ gimp_data_create_filename (GimpData *data, ...@@ -305,7 +304,7 @@ gimp_data_create_filename (GimpData *data,
if (safe_name[0] == '.') if (safe_name[0] == '.')
safe_name[0] = '_'; safe_name[0] = '_';
for (i = 0; safe_name[i]; i++) for (i = 0; safe_name[i]; i++)
if (safe_name[i] == G_DIR_SEPARATOR || isspace (safe_name[i])) if (safe_name[i] == G_DIR_SEPARATOR || g_ascii_isspace (safe_name[i]))
safe_name[i] = '_'; safe_name[i] = '_';
filename = g_strdup_printf ("%s%s", filename = g_strdup_printf ("%s%s",
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -179,7 +178,7 @@ static void ...@@ -179,7 +178,7 @@ static void
file_open_dialog_create (Gimp *gimp) file_open_dialog_create (Gimp *gimp)
{ {
GtkFileSelection *file_sel; GtkFileSelection *file_sel;
GtkTreeSelection *sel; GtkTreeSelection *tree_sel;
fileload = gtk_file_selection_new (_("Open Image")); fileload = gtk_file_selection_new (_("Open Image"));
...@@ -206,11 +205,15 @@ file_open_dialog_create (Gimp *gimp) ...@@ -206,11 +205,15 @@ file_open_dialog_create (Gimp *gimp)
gtk_quit_add_destroy (1, GTK_OBJECT (fileload)); gtk_quit_add_destroy (1, GTK_OBJECT (fileload));
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list)); tree_sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list));
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
/* disabled until fixed in GTK+
*
* gtk_tree_selection_set_mode (tree_sel, GTK_SELECTION_MULTIPLE);
*/
/* Catch file-list clicks so we can update the preview thumbnail */ /* Catch file-list clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (sel), "changed", g_signal_connect (G_OBJECT (tree_sel), "changed",
G_CALLBACK (file_open_selchanged_callback), G_CALLBACK (file_open_selchanged_callback),
fileload); fileload);
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "config.h" #include "config.h"
#include <ctype.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -103,7 +102,7 @@ file_proc_find_by_name (GSList *procs, ...@@ -103,7 +102,7 @@ file_proc_find_by_name (GSList *procs,
while (*p1 && *p2) while (*p1 && *p2)
{ {
if (tolower (*p1) != tolower (*p2)) if (g_ascii_tolower (*p1) != g_ascii_tolower (*p2))
break; break;
p1++; p1++;
...@@ -204,7 +203,7 @@ file_convert_string (gchar *instr, ...@@ -204,7 +203,7 @@ file_convert_string (gchar *instr,
for (tmpptr = tmp; (tmpptr-tmp) <= 3;) for (tmpptr = tmp; (tmpptr-tmp) <= 3;)
{ {
*(tmpptr++) = *(uin++); *(tmpptr++) = *(uin++);
if ( (*uin == '\0') || (!isdigit (*uin)) if ( (*uin == '\0') || (!g_ascii_isdigit (*uin))
|| (*uin == '8') || (*uin == '9')) || (*uin == '8') || (*uin == '9'))
break; break;
} }
...@@ -280,7 +279,7 @@ file_check_single_magic (gchar *offset, ...@@ -280,7 +279,7 @@ file_check_single_magic (gchar *offset,
/* Check numerical operator value if present */ /* Check numerical operator value if present */
if (num_operator_ptr && (*num_operator_ptr == '&')) if (num_operator_ptr && (*num_operator_ptr == '&'))
{ {
if (isdigit (num_operator_ptr[1])) if (g_ascii_isdigit (num_operator_ptr[1]))
{ {
if (num_operator_ptr[1] != '0') /* decimal */ if (num_operator_ptr[1] != '0') /* decimal */
sscanf (num_operator_ptr+1, "%ld", &num_operatorval); sscanf (num_operator_ptr+1, "%ld", &num_operatorval);
...@@ -300,7 +299,7 @@ file_check_single_magic (gchar *offset, ...@@ -300,7 +299,7 @@ file_check_single_magic (gchar *offset,
num_test = value[0]; num_test = value[0];
value++; value++;
} }
if (!isdigit (value[0])) return (0); if (!g_ascii_isdigit (value[0])) return (0);
/* /*
* to anybody reading this: is strtol's parsing behaviour (e.g. "0x" prefix) * to anybody reading this: is strtol's parsing behaviour (e.g. "0x" prefix)
......
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "config.h"
#include <glib.h> #include <glib.h>
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -106,7 +108,8 @@ get_token (ParseInfo *info) ...@@ -106,7 +108,8 @@ get_token (ParseInfo *info)
state = 1; state = 1;
slashed = FALSE; slashed = FALSE;
} }
else if ((buffer[info->position] == '-') || isdigit (buffer[info->position])) else if ((buffer[info->position] == '-') ||
g_ascii_isdigit (buffer[info->position]))
{ {
tokenbuf[tokenpos++] = buffer[info->position]; tokenbuf[tokenpos++] = buffer[info->position];
info->position += 1; info->position += 1;
...@@ -184,7 +187,7 @@ get_token (ParseInfo *info) ...@@ -184,7 +187,7 @@ get_token (ParseInfo *info)
} }
break; break;
case 3: case 3:
if (isdigit (buffer[info->position]) || if (g_ascii_isdigit (buffer[info->position]) ||
(buffer[info->position] == '.')) (buffer[info->position] == '.'))
{ {
tokenbuf[tokenpos++] = buffer[info->position]; tokenbuf[tokenpos++] = buffer[info->position];
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -179,7 +178,7 @@ static void ...@@ -179,7 +178,7 @@ static void
file_open_dialog_create (Gimp *gimp) file_open_dialog_create (Gimp *gimp)
{ {
GtkFileSelection *file_sel; GtkFileSelection *file_sel;
GtkTreeSelection *sel; GtkTreeSelection *tree_sel;
fileload = gtk_file_selection_new (_("Open Image")); fileload = gtk_file_selection_new (_("Open Image"));
...@@ -206,11 +205,15 @@ file_open_dialog_create (Gimp *gimp) ...@@ -206,11 +205,15 @@ file_open_dialog_create (Gimp *gimp)
gtk_quit_add_destroy (1, GTK_OBJECT (fileload)); gtk_quit_add_destroy (1, GTK_OBJECT (fileload));
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list)); tree_sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list));
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
/* disabled until fixed in GTK+
*
* gtk_tree_selection_set_mode (tree_sel, GTK_SELECTION_MULTIPLE);
*/
/* Catch file-list clicks so we can update the preview thumbnail */ /* Catch file-list clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (sel), "changed", g_signal_connect (G_OBJECT (tree_sel), "changed",
G_CALLBACK (file_open_selchanged_callback), G_CALLBACK (file_open_selchanged_callback),
fileload); fileload);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment