Skip to content

Commit

Permalink
get rid of EOL spaces
Browse files Browse the repository at this point in the history
Some editors remove them automatically, and people start sending patches
with such changes mixed in the patch with actual changes, which makes
those patches hard to review, so let's just sed out those spaces.
  • Loading branch information
notaz committed Aug 27, 2011
1 parent 834f868 commit 8290d9c
Show file tree
Hide file tree
Showing 19 changed files with 57 additions and 57 deletions.
4 changes: 2 additions & 2 deletions apps/pndevmapperd.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int main ( int argc, char *argv[] ) {

// umask
umask ( 022 ); // emitted files can be rwxr-xr-x

} // set up daemon

/* hmm, seems to not like working right after boot.. do we depend on another daemon or
Expand Down Expand Up @@ -861,7 +861,7 @@ unsigned char set_next_alarm ( unsigned int secs, unsigned int usecs ) {
// sucks
return ( 0 );
}

return ( 1 );
}

Expand Down
2 changes: 1 addition & 1 deletion apps/pndnotifyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int main ( int argc, char *argv[] ) {

// umask
umask ( 022 ); // emitted files can be rwxr-xr-x

} // set up daemon

// wait for a user to be logged in - we should probably get hupped when a user logs in, so we can handle
Expand Down
4 changes: 2 additions & 2 deletions lib/pnd_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ unsigned char pnd_apps_exec_disco ( char *pndrun, pnd_disco_t *app,
// -s startdir
// -b name for the appdir

if ( ( strcmp ( argv [ i ], "-a" ) == 0 ) ||
if ( ( strcmp ( argv [ i ], "-a" ) == 0 ) ||
( strcmp ( argv [ i ], "-p" ) == 0 ) ||
( strcmp ( argv [ i ], "-e" ) == 0 ) ||
( strcmp ( argv [ i ], "-s" ) == 0 ) ||
Expand Down Expand Up @@ -181,7 +181,7 @@ unsigned char pnd_apps_exec_disco ( char *pndrun, pnd_disco_t *app,
} else {
// child, do it
execv ( pndrun, argv );
}
}

// by definition, either error occurred or we are the original application.

Expand Down
2 changes: 1 addition & 1 deletion lib/pnd_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pnd_conf_handle pnd_conf_fetch_by_path ( char *fullpath ) {
} // key or key/value?

} // section or key/value line?

} // while

// clean up a trifle
Expand Down
8 changes: 4 additions & 4 deletions lib/pnd_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi
{
match = pnd_map_dotdesktop_category ( c, t );
}

if ( match ) {
strncat ( target_buffer, match, len );
len -= strlen ( target_buffer );
Expand All @@ -552,7 +552,7 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi
{
match = pnd_map_dotdesktop_category ( c, t );
}

if ( match ) {
if ( target_buffer [ 0 ] != '\0' && len > 0 ) {
strcat ( target_buffer, ";" );
Expand Down Expand Up @@ -581,7 +581,7 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi
{
match = pnd_map_dotdesktop_category ( c, t );
}

if ( match ) {
strncat ( target_buffer, match, len );
len -= strlen ( target_buffer );
Expand All @@ -607,7 +607,7 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi
{
match = pnd_map_dotdesktop_category ( c, t );
}

if ( match ) {
if ( target_buffer [ 0 ] != '\0' && len > 0 ) {
strcat ( target_buffer, ";" );
Expand Down
4 changes: 2 additions & 2 deletions lib/pnd_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ static int pnd_disco_callback ( const char *fpath, const struct stat *sb,
p -> appdata_dirname = strdup ( pnd_pxml_get_appdata_dirname ( pxmlh ) );
}
if ( pnd_pxml_get_clockspeed ( pxmlh ) ) {
p -> clockspeed = strdup ( pnd_pxml_get_clockspeed ( pxmlh ) );
p -> clockspeed = strdup ( pnd_pxml_get_clockspeed ( pxmlh ) );
}
if ( pnd_pxml_get_startdir ( pxmlh ) ) {
p -> startdir = strdup ( pnd_pxml_get_startdir ( pxmlh ) );
p -> startdir = strdup ( pnd_pxml_get_startdir ( pxmlh ) );
}
// category kruft
if ( pnd_pxml_get_main_category ( pxmlh ) ) {
Expand Down
2 changes: 1 addition & 1 deletion lib/pnd_io_evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ unsigned char pnd_evdev_catchup ( unsigned char blockp ) {

ret = select ( maxfd + 1, &fdset, NULL, NULL, ptv );

if ( ret < 0 ) {
if ( ret < 0 ) {
return ( 0 ); // something bad
} else if ( ret == 0 ) {
return ( 1 ); // all good, nothing here
Expand Down
36 changes: 18 additions & 18 deletions lib/pnd_io_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void PND_ReadEvents ( int fd, int device ) {
PND_CheckEvent ( &ev[i], device );
}
}

} // got fd?

return;
Expand All @@ -110,39 +110,39 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
switch( event->code ) {

case KEY_UP:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_up] = 1;
} else {
GLES2D_Pad[pke_pad_up] = 0;
}
break;

case KEY_DOWN:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_down] = 1;
} else {
GLES2D_Pad[pke_pad_down] = 0;
}
break;

case KEY_LEFT:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_left] = 1;
} else {
GLES2D_Pad[pke_pad_left] = 0;
}
break;

case KEY_RIGHT:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_right] = 1;
} else {
GLES2D_Pad[pke_pad_right] = 0;
}
break;

case KEY_MENU:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_menu] = 1;
} else {
GLES2D_Pad[pke_pad_menu] = 0;
Expand All @@ -158,47 +158,47 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
break;

case BTN_X:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_x] = 1;
} else {
GLES2D_Pad[pke_pad_x] = 0;
}
break;

case BTN_Y:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_y] = 1;
} else {
GLES2D_Pad[pke_pad_y] = 0;
}
break;

case BTN_A:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_a] = 1;
} else {
GLES2D_Pad[pke_pad_a] = 0;
}
break;

case BTN_B:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_b] = 1;
} else {
GLES2D_Pad[pke_pad_b] = 0;
}
break;

case BTN_TL:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_l] = 1;
} else {
GLES2D_Pad[pke_pad_l] = 0;
}
break;

case BTN_TR:
if ( event->value ) {
if ( event->value ) {
GLES2D_Pad[pke_pad_r] = 1;
} else {
GLES2D_Pad[pke_pad_r] = 0;
Expand All @@ -209,7 +209,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
break;
}
break;

case EV_ABS:

switch ( device ) {
Expand All @@ -221,12 +221,12 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
if( value > 0 ) {
value = 1;
} else if( value < 0 ) {
value = 1;
value = 1;
}
} else {
}
}

if( event->code == ABS_Y ) {
//printf( "nub1 y %3d\n", value );
if( abs(value) > NUB1_CUTOFF ) {
Expand All @@ -247,12 +247,12 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
if( value > 0 ) {
value = 1;
} else if( value < 0 ) {
value = 1;
value = 1;
}
} else {
}
}

if(event->code == ABS_Y) {
//printf( "nub2 y %3d\n", value );
if( abs(value) > NUB2_CUTOFF ) {
Expand Down Expand Up @@ -332,7 +332,7 @@ int PND_OpenEventDeviceByName ( char device_name[] ) {

ioctl(fd, EVIOCGNAME(sizeof(dev_name)), dev_name);
printf("Input device name: \"%s\"\n", dev_name);

return fd;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/pnd_pndfiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static unsigned char pnd_pnd_mountie ( char *pndrun, char *fullpath, char *uniqu
} else {
// child, do it
execv ( pndrun, argv );
}
}

// wait until mountscript actually completes
int status = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/pnd_pxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void pnd_pxml_delete ( pnd_pxml_handle h ) {
}

void pnd_pxml_set_app_name ( pnd_pxml_handle h, char *v ) {
/*
/*
* Please do not use this function if it can be avoided; it is only here for compatibility.
* The function might fail on low memory, and there's no way for the user to know when this happens.
*/
Expand Down
14 changes: 7 additions & 7 deletions lib/pnd_tinyxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ unsigned char pnd_pxml_parse_descriptions(const TiXmlHandle hRoot, pnd_pxml_t *a
app->descriptions_alloc_c = 4; //TODO: adjust this based on how many descriptions a PXML usually has. Power of 2.

app->descriptions = (pnd_localized_string_t *)malloc(sizeof(pnd_localized_string_t) * app->descriptions_alloc_c);
if (!app->descriptions)
if (!app->descriptions)
{
app->descriptions_alloc_c = 0;
return (0); //errno = NOMEM
Expand Down Expand Up @@ -310,7 +310,7 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int
{
app->previewpic2 = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_PREVPICSRC);
}
}
}
} //previewpic

//The author info:
Expand Down Expand Up @@ -347,7 +347,7 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int
i = 0;

//Goes through all the top-level categories and their sub-categories. i helps limit these to 2.
for (pElem = pElem->FirstChildElement(PND_PXML_ENAME_CAT); pElem && i < 2;
for (pElem = pElem->FirstChildElement(PND_PXML_ENAME_CAT); pElem && i < 2;
pElem = pElem->NextSiblingElement(PND_PXML_ENAME_CAT), i++)
{
//TODO: Fix pnd_pxml_t so that there can be more than 2 category 'trees' and more than 2 subcategories. Then this can be removed.
Expand Down Expand Up @@ -396,7 +396,7 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int
{
i = 0;
//Go through all associations. i serves as index; since the format only supports 3 associations we need to keep track of the number.
for (pElem = pElem->FirstChildElement(PND_PXML_ENAME_ASSOC); pElem && i < 3;
for (pElem = pElem->FirstChildElement(PND_PXML_ENAME_ASSOC); pElem && i < 3;
pElem = pElem->NextSiblingElement(PND_PXML_ENAME_ASSOC), i++)
{
char *name = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_ASSOCNAME);
Expand Down Expand Up @@ -434,13 +434,13 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int
//Performance related things (aka: Clockspeed XD):
pElem = hRoot.FirstChild(PND_PXML_ENAME_CLOCK).Element();
if (pElem)
{
{
app->clockspeed = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_CLOCKFREQ);
}

// Package
pElem = hRoot.FirstChild ( PND_PXML_ENAME_PACKAGE ).Element();
if ( pElem ) {
if ( pElem ) {
app -> package_name = pnd_pxml_get_attribute ( pElem, PND_PXML_ATTRNAME_PACKAGE_NAME );
app -> package_release_date = pnd_pxml_get_attribute ( pElem, PND_PXML_ATTRNAME_PACKAGE_DATE );
}
Expand All @@ -458,7 +458,7 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int
}

while ( ( pElem = pElem -> NextSiblingElement ( PND_PXML_ENAME_MKDIR ) ) ) {

if ( ( t = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_MKDIRPATH) ) ) {
char *foo = (char*) malloc ( strlen ( app -> mkdir_sp ) + strlen ( t ) + 1 /*:*/ + 1 /*\0*/ );

Expand Down
4 changes: 2 additions & 2 deletions minimenu/mmcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ unsigned char cache_preview ( pnd_disco_t *app, unsigned int maxwidth, unsigned
}
// set up target filename to copy
snprintf ( buffer, PATH_MAX, "%s/%s/%s.png", cacheoutpath, cache_path, app -> unique_id );
pnd_log ( pndn_debug, "Found free space to cache preview to here: %s", buffer );
pnd_log ( pndn_debug, "Found free space to cache preview to here: %s", buffer );
if ( ! pnd_filecopy ( filepath, buffer ) ) {
pnd_log ( pndn_error, "ERROR: Copying preview from %s to %s", filepath, buffer );
pnd_log ( pndn_error, "ERROR: Copying preview from %s to %s", filepath, buffer );
}
} else {
pnd_log ( pndn_warning, "WARN: Couldn't find a device to cache preview to.\n" );
Expand Down
10 changes: 5 additions & 5 deletions minimenu/mmcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ unsigned char category_meta_push ( char *catname, char *parentcatname, pnd_disco
if ( parentcatname ) {
if ( ( ! fdcat -> parent_cat ) ||
( ! fdpcat ) )
{
{
// child cat points to a different parent than requested parent!
cat_is_clean = 0;
pnd_log ( pndn_warning, "PXML Fail %s: Cat request %s (parent %s) -> cat wants to be child of a cat which FD says is the wrong parent (1)\n", app -> title_en ? app -> title_en : "no name?", catname, parentcatname ? parentcatname : "n/a" );
Expand Down Expand Up @@ -853,15 +853,15 @@ unsigned int category_count ( unsigned int filter_mask ) {

int category_index ( char *catname ) {
unsigned char i;

for ( i = 0; i < g_categorycount; i++ ) {

if ( strcasecmp ( g_categories [ i ] -> catname, catname ) == 0 ) {
return ( i );
}

}

return ( -1 );
}

Expand Down
Loading

0 comments on commit 8290d9c

Please sign in to comment.