Commit 8ec1d65a authored by Sven Neumann's avatar Sven Neumann

removed trailing whitespace

svn path=/trunk/; revision=26852
parent eada9412
2008-09-04 Sven Neumann <sven@gimp.org>
* app/composite/make-installer.py
* app/composite/ns.py
* app/dialogs/tips-dialog.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-scroll.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/paint/gimppaintcore-stroke.c
* app/tools/gimpcroptool.c
* app/widgets/gtkscalebutton.c
* plug-ins/common/animation-play.c
* plug-ins/common/displace.c
* plug-ins/common/file-raw.c
* plug-ins/imagemap/imap_cern_lex.c
* plug-ins/imagemap/imap_cern_parse.c
* plug-ins/imagemap/imap_csim_lex.c
* plug-ins/imagemap/imap_csim_parse.c
* plug-ins/imagemap/imap_ncsa_lex.c
* plug-ins/imagemap/imap_ncsa_parse.c
* plug-ins/pygimp/gimpfu.py
* plug-ins/pygimp/gimpshelf.py
* plug-ins/pygimp/gimpthumbmodule.c
* plug-ins/pygimp/gimpui.py
* plug-ins/pygimp/gimpuimodule.c
* plug-ins/pygimp/plug-ins/benchmark-foreground-extract.py
* plug-ins/pygimp/plug-ins/foggify.py
* plug-ins/pygimp/plug-ins/palette-offset.py
* plug-ins/pygimp/plug-ins/palette-sort.py
* plug-ins/pygimp/plug-ins/palette-to-gradient.py
* plug-ins/pygimp/plug-ins/py-slice.py
* plug-ins/pygimp/plug-ins/python-console.py
* plug-ins/pygimp/plug-ins/python-eval.py
* plug-ins/pygimp/plug-ins/whirlpinch.py
* plug-ins/pygimp/pygimp-colors.c
* plug-ins/pygimp/pygimp-drawable.c
* plug-ins/pygimp/pygimp-image.c
* plug-ins/script-fu/re/engine.c
* plug-ins/script-fu/re/regerror.c
* plug-ins/script-fu/tinyscheme/dynload.c
* plug-ins/twain/tw_func.c
* plug-ins/twain/tw_util.c
* plug-ins/twain/tw_win.c
* plug-ins/twain/twain.h
* tools/defcheck.py
* tools/gimppath2svg.py: removed trailing whitespace.
2008-09-03 Lars-Peter Clausen <lars@metafoo.de>
* plugin-ins/pygimp/pygimp-tile.c: Removed trailing whitespace.
......
......@@ -102,7 +102,7 @@ pixel_format=[
def mode_name(mode):
s = string.replace(mode.lower(), "gimp_composite_", "")
return (s)
def pixel_depth_name(pixel_format):
s = string.replace(pixel_format.lower(), "gimp_pixelformat_", "")
return (s)
......@@ -135,7 +135,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
if len(function_table) < 1:
return;
print >>fpout, 'static const struct install_table {'
print >>fpout, ' GimpCompositeOperation mode;'
print >>fpout, ' GimpPixelFormat A;'
......@@ -148,7 +148,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
for r in requirements:
print >>fpout, '#if %s' % (r)
pass
for mode in composite_modes:
for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
......@@ -168,9 +168,9 @@ def print_function_table(fpout, name, function_table, requirements=[]):
print >>fpout, ' { 0, 0, 0, 0, NULL }'
print >>fpout, '};'
return
def print_function_table_name(fpout, name, function_table):
print >>fpout, ''
......@@ -197,9 +197,9 @@ def print_function_table_name(fpout, name, function_table):
pass
print >>fpout, '};\n'
return
def load_function_table(filename):
nmx = ns.nmx(filename)
......@@ -210,12 +210,12 @@ def load_function_table(filename):
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
for D in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
for a in ["GIMP_PIXELFORMAT_ANY", A]:
for b in ["GIMP_PIXELFORMAT_ANY", B]:
for d in ["GIMP_PIXELFORMAT_ANY", D]:
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(a), pixel_depth_name(b), pixel_depth_name(d))
f = nmx.exports_re(key + ".*")
if f != None: gimp_composite_function["%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))] = [f]
pass
......@@ -231,7 +231,7 @@ def load_function_table(filename):
def merge_function_tables(tables):
main_table = copy.deepcopy(tables[0][1])
for t in tables[1:]:
#print >>sys.stderr, t[0]
for mode in composite_modes:
......@@ -248,7 +248,7 @@ def merge_function_tables(tables):
pass
pass
pass
return (main_table)
......@@ -281,7 +281,7 @@ def gimp_composite_regression(fpout, function_tables, options):
for r in options.requires:
print >>fpout, '#if %s' % (r)
pass
print >>fpout, ' GimpCompositeContext generic_ctx;'
print >>fpout, ' GimpCompositeContext special_ctx;'
print >>fpout, ' double ft0;'
......@@ -349,11 +349,11 @@ def gimp_composite_regression(fpout, function_tables, options):
print >>fpout, ' gimp_composite_context_init (&generic_ctx, %s, %s, %s, %s, %s, n_pixels, (unsigned char *) %sA, (unsigned char *) %sB, (unsigned char *) %sB, (unsigned char *) %sD1);' % (
mode, A, B, D, D, pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D), pixel_depth_name(D))
print >>fpout, ' ft0 = gimp_composite_regression_time_function (iterations, %s, &generic_ctx);' % ("gimp_composite_dispatch")
print >>fpout, ' ft1 = gimp_composite_regression_time_function (iterations, %s, &special_ctx);' % (generic_table[key][0])
print >>fpout, ' if (gimp_composite_regression_compare_contexts ("%s", &generic_ctx, &special_ctx))' % (mode_name(mode))
print >>fpout, ' {'
print >>fpout, ' printf("%s_%s_%s_%s failed\\n");' % (mode_name(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
print >>fpout, ' return (1);'
......@@ -364,11 +364,11 @@ def gimp_composite_regression(fpout, function_tables, options):
pass
pass
pass
for r in options.requires:
print >>fpout, '#endif'
pass
print >>fpout, ' return (0);'
print >>fpout, '}'
......@@ -434,7 +434,7 @@ def gimp_composite_installer_install2(fpout, name, function_table, requirements=
else:
print >>fpout, ' /* nothing to do */'
pass
print >>fpout, ''
print >>fpout, ' return (FALSE);'
print >>fpout, '}'
......@@ -499,7 +499,7 @@ def gimp_composite_hfile(fpout, name, function_table):
print >>fpout, 'void %s_install (void);' % (functionnameify(name))
print >>fpout, ''
print >>fpout, 'typedef void (*%s_table[%s][%s][%s][%s]);' % (functionnameify(name), "GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
return
def gimp_composite_cfile(fpout, name, function_table, requirements=[], cpu_feature=[]):
......
......@@ -42,7 +42,7 @@ class nmx:
def __init__(self, objfile=None):
self.objects = dict()
self.filename = None
if objfile != None:
self.update(objfile)
pass
......@@ -71,7 +71,7 @@ class nmx:
pass
object = objfile
for (type, symbol) in symbols:
if not self.objects.has_key(object):
self.objects.update({ object : dict({ "exports" : dict(), "imports" : dict() }) })
......
......@@ -188,7 +188,7 @@ tips_dialog_create (Gimp *gimp)
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
more_button = gtk_link_button_new_with_label ("http://docs.gimp.org/",
/* a link to the related section in the user manual */
_("Learn more"));
......
......@@ -333,17 +333,17 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
*/
target_offset_x = shell->offset_x;
target_offset_y = shell->offset_y;
if (! center_horizontally)
{
target_offset_x = MAX (shell->offset_x, 0);
}
if (! center_vertically)
{
target_offset_y = MAX (shell->offset_y, 0);
}
gimp_display_shell_scroll_set_offset (shell,
target_offset_x,
target_offset_y);
......
......@@ -405,7 +405,7 @@ gimp_display_shell_scroll_center_image_on_next_size_allocate (GimpDisplayShell *
data->shell = shell;
data->horizontally = horizontally;
data->vertically = vertically;
g_signal_connect (shell->canvas, "size-allocate",
G_CALLBACK (gimp_display_shell_scroll_center_image_callback),
data);
......
......@@ -343,7 +343,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->scroll_start_x = 0;
shell->scroll_start_y = 0;
shell->button_press_before_focus = FALSE;
shell->highlight = NULL;
shell->mask = NULL;
......
......@@ -278,7 +278,7 @@ gimp_navigation_editor_popup (GimpDisplayShell *shell,
gint popup_width, popup_height;
gint border_width, border_height;
gint screen_click_x, screen_click_y;
gdk_window_get_origin (widget->window, &x_origin, &y_origin);
screen_click_x = x_origin + click_x;
......
......@@ -338,7 +338,7 @@ gimp_paint_core_stroke_emulate_dynamics (GimpCoords *coords,
{
coords[i].pressure = i * slope;
}
/* Calculate pressure end ramp */
for (i = length - ramp_length; i < length; i++)
{
......
......@@ -338,7 +338,7 @@ gimp_crop_tool_execute (GimpRectangleTool *rectangle,
* gimp_crop_tool_rectangle_change_complete:
* @rectangle:
*
* Returns:
* Returns:
**/
static gboolean
gimp_crop_tool_rectangle_change_complete (GimpRectangleTool *rectangle)
......
......@@ -175,7 +175,7 @@ gimp_gtk_binding_signal_new (const gchar *signal_name,
guint signal_id;
g_return_val_if_fail (signal_name != NULL, 0);
va_start (args, n_params);
signal_id = g_signal_new_valist (signal_name, itype, signal_flags,
......@@ -184,7 +184,7 @@ gimp_gtk_binding_signal_new (const gchar *signal_name,
return_type, n_params, args);
va_end (args);
return signal_id;
}
......
2008-09-04 Sven Neumann <sven@gimp.org>
* tools/shadow.c: removed trailing whitespace.
2008-08-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets.types
......
......@@ -112,13 +112,13 @@ create_shadow (GdkPixbuf *src)
sumb += src_pixels [src_y * src_rowstride +
src_x * src_bpp + 2] *
filter->data [i * filter->size + j];
if (src_bpp == 4)
suma += src_pixels [src_y * src_rowstride +
src_x * src_bpp + 3] *
filter->data [i * filter->size + j];
}
}
......
......@@ -1438,7 +1438,7 @@ play_callback (GtkToggleAction *action)
playing = gtk_toggle_action_get_active (action);
if (playing)
timer = g_timeout_add (get_frame_duration (frame_number) *
timer = g_timeout_add (get_frame_duration (frame_number) *
get_duration_factor (duration_index),
advance_frame_callback, NULL);
......
......@@ -843,10 +843,10 @@ displace_get_label_size (void)
for (j = 0; j < 2; j++)
{
GtkRequisition requisition;
gtk_button_set_label (GTK_BUTTON (toggle_x), gettext (mtext[i][j]));
gtk_widget_size_request (toggle_x, &requisition);
if (requisition.width > label_maxwidth)
label_maxwidth = requisition.width;
}
......
......@@ -213,7 +213,7 @@ run (const gchar *name,
static GimpParam values[2];
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GError *error = NULL;
GError *error = NULL;
gint32 image_id;
gint32 drawable_id;
......
......@@ -52,7 +52,7 @@
#if __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
......@@ -69,7 +69,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
......@@ -179,7 +179,7 @@ extern FILE *cern_in, *cern_out;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
......@@ -246,7 +246,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
......@@ -621,7 +621,7 @@ extern int cern_wrap (void );
#endif
static void yyunput (int c,char *buf_ptr );
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
......@@ -742,7 +742,7 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 45 "imap_cern.l"
......@@ -1194,7 +1194,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
......@@ -1248,7 +1248,7 @@ static int yy_get_next_buffer (void)
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up cern_text */
......@@ -1291,7 +1291,7 @@ static int yy_get_next_buffer (void)
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
......@@ -1358,12 +1358,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void cern_restart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
cern_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
......@@ -1376,11 +1376,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*
*/
void cern__switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* cern_pop_buffer_state();
......@@ -1420,13 +1420,13 @@ static void cern__load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE cern__create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) cern_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in cern__create_buffer()" );
......@@ -1449,11 +1449,11 @@ static void cern__load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with cern__create_buffer()
*
*
*/
void cern__delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
......@@ -1469,7 +1469,7 @@ static void cern__load_buffer_state (void)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a cern_restart() or at EOF.
......@@ -1478,7 +1478,7 @@ extern int isatty (int );
{
int oerrno = errno;
cern__flush_buffer(b );
b->yy_input_file = file;
......@@ -1494,13 +1494,13 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*
*/
void cern__flush_buffer (YY_BUFFER_STATE b )
{
......@@ -1529,7 +1529,7 @@ extern int isatty (int );
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*
*/
void cern_push_buffer_state (YY_BUFFER_STATE new_buffer )
{
......@@ -1559,7 +1559,7 @@ void cern_push_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*
*/
void cern_pop_buffer_state (void)
{
......@@ -1583,7 +1583,7 @@ void cern_pop_buffer_state (void)
static void cern_ensure_buffer_stack (void)
{
int num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
......@@ -1594,9 +1594,9 @@ static void cern_ensure_buffer_stack (void)
(yy_buffer_stack) = (struct yy_buffer_state**)cern_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
......@@ -1622,13 +1622,13 @@ static void cern_ensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE cern__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
......@@ -1657,14 +1657,14 @@ YY_BUFFER_STATE cern__scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to cern_lex() will
* scan from a @e copy of @a str.
* @param str a NUL-terminated string to scan
*
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* cern__scan_bytes() instead.
*/
YY_BUFFER_STATE cern__scan_string (yyconst char * yystr )
{
return cern__scan_bytes(yystr,strlen(yystr) );
}
......@@ -1672,7 +1672,7 @@ YY_BUFFER_STATE cern__scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
*
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE cern__scan_bytes (yyconst char * yybytes, int _yybytes_len )
......@@ -1681,7 +1681,7 @@ YY_BUFFER_STATE cern__scan_bytes (yyconst char * yybytes, int _yybytes_len )
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) cern_alloc(n );
......@@ -1735,16 +1735,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*
*/
int cern_get_lineno (void)
{
return cern_lineno;
}
/** Get the input stream.
*
*
*/
FILE *cern_get_in (void)
{
......@@ -1752,7 +1752,7 @@ FILE *cern_get_in (void)
}
/** Get the output stream.
*
*
*/
FILE *cern_get_out (void)
{
......@@ -1760,7 +1760,7 @@ FILE *cern_get_out (void)
}
/** Get the length of the current token.
*
*
*/
int cern_get_leng (void)
{
......@@ -1768,7 +1768,7 @@ int cern_get_leng (void)
}
/** Get the current token.
*
*
*/
char *cern_get_text (void)
......@@ -1778,18 +1778,18 @@ char *cern_get_text (void)
/** Set the current line number.
* @param line_number
*
*
*/
void cern_set_lineno (int line_number )
{
cern_lineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
*
* @see cern__switch_to_buffer
*/
void cern_set_in (FILE * in_str )
......@@ -1843,7 +1843,7 @@ static int yy_init_globals (void)
/* cern_lex_destroy is for both reentrant and non-reentrant scanners. */
int cern_lex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
cern__delete_buffer(YY_CURRENT_BUFFER );
......
......@@ -1165,7 +1165,7 @@ yyparse ()
#endif
#endif
{
int yystate;
int yyn;
int yyresult;
......@@ -1470,7 +1470,7 @@ yyreduce:
{
Polygon_t *polygon = ObjectToPolygon(current_object);
GdkPoint *point = new_point((gint) (yyvsp[(2) - (5)].value), (gint) (yyvsp[(4) - (5)].value));
polygon->points = g_list_append(polygon->points,
polygon->points = g_list_append(polygon->points,
(gpointer) point);
}
break;
......@@ -1497,7 +1497,7 @@ yyreduce:
MapInfo_t *info = get_map_info();
gchar *description;
description = g_strconcat(info->description, (yyvsp[(2) - (2)].id), "\n",
description = g_strconcat(info->description, (yyvsp[(2) - (2)].id), "\n",
NULL);
g_strreplace(&info->description, description);
g_free ((yyvsp[(2) - (2)].id));
......@@ -1723,7 +1723,7 @@ yyreturn:
#line 163 "imap_cern.y"
static void
static void
cern_error(char* s)
{
extern FILE *cern_in;
......
......@@ -52,7 +52,7 @@
#if __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
......@@ -69,7 +69,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;