]> git.openpandora.org Git - pandora-libraries.git/commitdiff
get rid of EOL spaces
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 27 Aug 2011 13:56:04 +0000 (16:56 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 27 Aug 2011 13:59:12 +0000 (16:59 +0300)
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.

19 files changed:
apps/pndevmapperd.c
apps/pndnotifyd.c
lib/pnd_apps.c
lib/pnd_conf.c
lib/pnd_desktop.c
lib/pnd_discovery.c
lib/pnd_io_evdev.c
lib/pnd_io_gpio.c
lib/pnd_pndfiles.c
lib/pnd_pxml.c
lib/pnd_tinyxml.cpp
minimenu/mmcache.c
minimenu/mmcat.c
minimenu/mmconf.c
minimenu/mmenu.c
minimenu/mmui.c
minimenu/mmwrapper.c
test/rawpxmltest.c
testdata/scripts/pnd_make.sh

index 3f860ed30daf2fc8833923f7459d6de83a1f641d..273a43c920f21c33fb19a9e7ca17441bee1e8f65 100644 (file)
@@ -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
@@ -861,7 +861,7 @@ unsigned char set_next_alarm ( unsigned int secs, unsigned int usecs ) {
     // sucks
     return ( 0 );
   }
-  
+
   return ( 1 );
 }
 
index 346ab25405152e4f6f51f75e10173aa563da26cb..fd1c1a11e475cd5b7399f644206dd0992bffaaee 100644 (file)
@@ -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
index c5eec2f43eafc0d2fbb2c655db858bcd2734c2b2..ad5cf8c2a58b780e991b6baf3683cea902831525 100644 (file)
@@ -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 ) ||
@@ -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.
 
index 88d0c46331edfef5cf46d6aedd54c44821d6cb49..9c4f31fc7369c23d9848f04935df587b1fc322fd 100644 (file)
@@ -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
index 349056d2366c9ea24042a121afbaf70d2dfb6d43..84e420ad81e5820912faa5d57d14c8903b9058ae 100644 (file)
@@ -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 );
@@ -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, ";" );
@@ -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 );
@@ -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, ";" );
index b6627d2c513b41fb07cb999e89f5405a6571a87b..84376e922b47b403761ea65af0b427c67b97220b 100644 (file)
@@ -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 ) ) {
index 98a85507bce682f406a3347a55d5f82f10df4263..e88870a22304d89752d9cb5efd695ba56faf30bc 100644 (file)
@@ -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
index d8824aa890f2c99179d8db241213c85d6bb7b4a7..0e666efea1f10537778b2652d56190fba45a81dc 100755 (executable)
@@ -90,7 +90,7 @@ void PND_ReadEvents ( int fd, int device ) {
        PND_CheckEvent ( &ev[i], device );
       }
     }
-  
+
   } // got fd?
 
   return;
@@ -110,7 +110,7 @@ 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;
@@ -118,7 +118,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case KEY_DOWN:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_down] = 1;
       } else {
        GLES2D_Pad[pke_pad_down] = 0;
@@ -126,7 +126,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case KEY_LEFT:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_left] = 1;
       }        else {
        GLES2D_Pad[pke_pad_left] = 0;
@@ -134,7 +134,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case KEY_RIGHT:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_right] = 1;
       }        else {
        GLES2D_Pad[pke_pad_right] = 0;
@@ -142,7 +142,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case KEY_MENU:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_menu] = 1;
       }        else {
        GLES2D_Pad[pke_pad_menu] = 0;
@@ -158,7 +158,7 @@ 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;
@@ -166,7 +166,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case BTN_Y:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_y] = 1;
       }        else {
        GLES2D_Pad[pke_pad_y] = 0;
@@ -174,7 +174,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case BTN_A:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_a] = 1;
       }        else {
        GLES2D_Pad[pke_pad_a] = 0;
@@ -182,7 +182,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case BTN_B:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_b] = 1;
       }        else {
        GLES2D_Pad[pke_pad_b] = 0;
@@ -190,7 +190,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case BTN_TL:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_l] = 1;
       }        else {
        GLES2D_Pad[pke_pad_l] = 0;
@@ -198,7 +198,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
 
     case BTN_TR:
-      if ( event->value ) {    
+      if ( event->value ) {
        GLES2D_Pad[pke_pad_r] = 1;
       }        else {
        GLES2D_Pad[pke_pad_r] = 0;
@@ -209,7 +209,7 @@ void PND_CheckEvent ( struct input_event *event, int device ) {
       break;
     }
     break;
-    
+
   case EV_ABS:
 
     switch ( device ) {
@@ -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 ) {
@@ -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 ) {
@@ -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;
     }
 
index 39fac77c2acfbc94a38eb29743e6b58a1cd2d0b6..3200442b99564f75e8613c6a8493afe2ffb61927 100644 (file)
@@ -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;
index f2cc4f67b95a081f42aebd6b4fab7475a9926b73..3a9406d4ef5d4e1dd64ef7b74a13fc9dc469a602 100644 (file)
@@ -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.
    */
index 5867135398e24dbca31293b008cf07f266d30ae9..8bb74365a5a6b962afd93d73a256a157c0f8b189 100644 (file)
@@ -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
@@ -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:
@@ -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.
@@ -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);
@@ -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 );
     }
@@ -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*/ );
 
index 3ebb104e17675157888d3c52011ed737ad86161b..9b0c8bc15e1cb60f6b1390fb142bbb21a0af08e3 100644 (file)
@@ -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" );
index ab3e9d4bfbf81e17fd216981fb8ac14008720d53..9600d332d1cd434e2603960d327310a316205d8e 100644 (file)
@@ -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" );
@@ -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 );
 }
 
index 3f2fac233f7c39143c4b8592a3c5c2e1a11e6c48..c038e2eb05867247ff0c98fba443ca647b87857a 100644 (file)
@@ -682,7 +682,7 @@ unsigned char conf_write ( pnd_conf_handle h, char *fullpath ) {
     // does item begin with app or tab tag?
     char *k = pnd_box_get_key ( v );
 
-    if ( k && 
+    if ( k &&
         ( strncasecmp ( k, "appshow.", 8 ) == 0 ||
           strncasecmp ( k, "tabshow.", 8 ) == 0 )
        )
@@ -818,7 +818,7 @@ void conf_reset_to_default ( pnd_conf_handle h ) {
     // does item begin with app or tab tag?
     char *k = pnd_box_get_key ( v );
 
-    if ( k && 
+    if ( k &&
         ( strncasecmp ( k, "appshow.", 8 ) == 0 ||
           strncasecmp ( k, "tabshow.", 8 ) == 0 )
        )
index 6ada53f2d6d2c4cf6d9d18620e96c64c42afd5c5..be38fb0c6189c88e23b9e20e3bf01b6cd4d4a2a5 100644 (file)
@@ -448,7 +448,7 @@ static unsigned int is_dir_empty ( char *fullpath ) {
     } else {
       // something else came in, so dir must not be empty
       closedir ( d );
-      return ( 0 ); 
+      return ( 0 );
     }
 
     de = readdir ( d );
@@ -663,7 +663,7 @@ void applications_scan ( void ) {
         ( pnd_pxml_get_x11 ( iter -> option_no_x11 ) == pnd_pxml_x11_required && g_x11_present == 1 )
        )
     {
- 
+
       if ( iter -> title_en == NULL || iter -> title_en [ 0 ] == '\0' ) {
        // null title; just skip it.
       } else {
@@ -836,7 +836,7 @@ void emit_and_run ( char *buffer ) {
   } else {
     // child, do it
     execl ( "/bin/sh", "/bin/sh", "-c", buffer + strlen(MM_RUN) + 1, (char*) NULL );
-  } 
+  }
 
   return;
 }
index 0c9a5f1ddb8184550c4bd7b96086a1afbe78375c..25a9f3baf8a1d0a92f17d38f540e1f176b0d639a 100644 (file)
@@ -3434,7 +3434,7 @@ void ui_menu_context ( mm_appref_t *a ) {
          context_alive = 0; // nolonger visible, so lets just get out
 
        }
-    
+
        break;
 
       case context_app_recategorize:
@@ -3862,7 +3862,7 @@ unsigned char ui_menu_get_text_line ( char *title, char *footer, char *initialva
     } // while waiting for input
 
   } // while
-  
+
   return ( 0 );
 }
 
index 63749f1d65228356253dbe3601cf245e1d154ab8..2b5092962d4788e08c893ff304f312699245c529 100644 (file)
@@ -151,7 +151,7 @@ int main ( int argc, char *argv[] ) {
 
     // umask
     umask ( 022 ); // emitted files can be rwxr-xr-x
-    
+
   } // set up daemon
 
   // check frontend
index 06545ba8adc84b9e0a27234a61f3b89bc12454d3..202d226cf1b3bd83681e3ea829de2a692bc15d41 100644 (file)
@@ -9,7 +9,7 @@
 //Used like a unit test, almost
 int main (int argc, char **argv)
 {
-       if (argc != 2) 
+       if (argc != 2)
        {
                printf("Wrong nr of args.\nUsage: %s <pxml filename>\n", argv[0]);
                return 1;
index 0c03e8154dac01cd4cf8e3a34ae5f536b3fc19ea..b1828199da61d8059f7ea4d77be0ef7b40a238e6 100755 (executable)
@@ -272,7 +272,7 @@ then
                cecho "ERROR: Your squashfs version is older then version 4, please upgrade to 4.0 or later" $red
                exit 1
        fi
-       mksquashfs $FOLDER $PNDNAME.iso -nopad -no-recovery
+       mksquashfs $FOLDER $PNDNAME.iso # -nopad -no-recovery
 else
        check_for_tool mkisofs
        mkisofs -o $PNDNAME.iso -R $FOLDER