···253253 return PLUGIN_ERROR;
254254 }
255255256256- n = rb->write(fd, buf, 8);
257257- n = rb->write(fd, hash, sizeof(hash));
258258- n = rb->write(fd, buf + 2, size);
256256+ n = rb->write(fd, buf, 8);
257257+ n = rb->write(fd, hash, sizeof(hash));
258258+ n = rb->write(fd, buf + 2, size);
259259260260 rb->close(fd);
261261 } else if (memcmp(buf + 1,"nn2x",4)==0) {
+30-30
apps/plugins/iriverify.c
···7575 buf_ptr = stringbuffer;
7676 str_begin = stringbuffer;
7777 do {
7878- /* Transform slashes into backslashes */
7878+ /* Transform slashes into backslashes */
7979 if(*buf_ptr == '/')
8080- *buf_ptr = '\\';
8080+ *buf_ptr = '\\';
81818282- if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
8383- /* We have no complete string ? It's only a leading \n or \r ? */
8484- if (!str_begin)
8585- continue;
8686-8787- /* Terminate string */
8888- *buf_ptr = 0;
8282+ if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
8383+ /* We have no complete string ? It's only a leading \n or \r ? */
8484+ if (!str_begin)
8585+ continue;
8686+8787+ /* Terminate string */
8888+ *buf_ptr = 0;
89899090- /* Write our new string */
9191- rc = rb->write(fd, str_begin, rb->strlen(str_begin));
9292- if(rc < 0) {
9393- rb->close(fd);
9494- return 10 * rc - 2;
9595- }
9696- /* Write CR/LF */
9797- rc = rb->write(fd, crlf, 2);
9898- if(rc < 0) {
9999- rb->close(fd);
100100- return 10 * rc - 3;
101101- }
9090+ /* Write our new string */
9191+ rc = rb->write(fd, str_begin, rb->strlen(str_begin));
9292+ if(rc < 0) {
9393+ rb->close(fd);
9494+ return 10 * rc - 2;
9595+ }
9696+ /* Write CR/LF */
9797+ rc = rb->write(fd, crlf, 2);
9898+ if(rc < 0) {
9999+ rb->close(fd);
100100+ return 10 * rc - 3;
101101+ }
102102103103- /* Reset until we get a new line */
104104- str_begin = NULL;
103103+ /* Reset until we get a new line */
104104+ str_begin = NULL;
105105106106- }
107107- else {
108108- /* We start a new line here */
109109- if (!str_begin)
110110- str_begin = buf_ptr;
111111- }
106106+ }
107107+ else {
108108+ /* We start a new line here */
109109+ if (!str_begin)
110110+ str_begin = buf_ptr;
111111+ }
112112113113- /* Next char, until ... */
113113+ /* Next char, until ... */
114114 } while(buf_ptr++ < stringbuffer + readsize);
115115116116 rb->close(fd);
+12-12
apps/plugins/matrix.c
···259259 y = 0;
260260 firstcoldone = 0;
261261 while (i <= ROWS) {
262262- /* Skip over spaces */
263263- /* this is whear the characters were disappearing */
264264-/*
262262+ /* Skip over spaces */
263263+ /* this is whear the characters were disappearing */
264264+/*
265265 while (i <= ROWS && (matrix[i][j].val == 129 ||
266266 matrix[i][j].val == -1))
267267 i++;
268268*/
269269- /* A little more random now for spaces */
269269+ /* A little more random now for spaces */
270270 if (rb->rand() % randomness == 1){
271271- while (i <= ROWS && (matrix[i][j].val == 129 ||
271271+ while (i <= ROWS && (matrix[i][j].val == 129 ||
272272 matrix[i][j].val == -1)){
273273 i++;
274274- randomness--;
275275- if(randomness <=1)
276276- randomness = 6;}
274274+ randomness--;
275275+ if(randomness <=1)
276276+ randomness = 6;}
277277 }else{
278278- randomness++;
279279- if(randomness >6)
280280- randomness = 6;
281281- }
278278+ randomness++;
279279+ if(randomness >6)
280280+ randomness = 6;
281281+ }
282282283283284284 if (i > ROWS)
+19-19
apps/plugins/ppmviewer.c
···5757{
5858 char ch;
59596060- if (!rb->read(fd, &ch, 1)) {
6161- ppm_error("EOF. Read error reading a byte");
6262- return PLUGIN_ERROR;
6363- }
6060+ if (!rb->read(fd, &ch, 1)) {
6161+ ppm_error("EOF. Read error reading a byte");
6262+ return PLUGIN_ERROR;
6363+ }
64646565 if (ch == '#') {
6666 do {
6767- if (!rb->read(fd, &ch, 1)) {
6868- ppm_error("EOF. Read error reading a byte");
6969- return PLUGIN_ERROR;
7070- }
7171- } while (ch != '\n' && ch != '\r');
7272- }
6767+ if (!rb->read(fd, &ch, 1)) {
6868+ ppm_error("EOF. Read error reading a byte");
6969+ return PLUGIN_ERROR;
7070+ }
7171+ } while (ch != '\n' && ch != '\r');
7272+ }
7373 return ch;
7474}
7575···81818282 do {
8383 ch = ppm_getc(fd);
8484- } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
8484+ } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
85858686 if (ch < '0' || ch > '9') {
8787 ppm_error("Junk (%c) in file where an integer should be.", ch);
···213213 int col;
214214 int r, g, b;
215215 switch (format) {
216216- case PPM_FORMAT:
216216+ case PPM_FORMAT:
217217 for (col = 0; col < cols; ++col) {
218218 r = ppm_getuint(fd);
219219 g = ppm_getuint(fd);
···231231 }
232232 break;
233233234234- case RPPM_FORMAT:
234234+ case RPPM_FORMAT:
235235 for (col = 0; col < cols; ++col) {
236236 r = ppm_getrawsample(fd, maxval);
237237 g = ppm_getrawsample(fd, maxval);
···246246 (255 / maxval) * r,
247247 (255 / maxval) * g,
248248 (255 / maxval) * b);
249249- }
250250- break;
249249+ }
250250+ break;
251251252252- default:
252252+ default:
253253 ppm_error("What?!");
254254- return PLUGIN_ERROR;
255255- }
256256- return 1;
254254+ return PLUGIN_ERROR;
255255+ }
256256+ return 1;
257257}
258258259259int read_ppm(int fd,
···306306/* drawer function for the GUI_EVENT_REDRAW callback */
307307void tree_drawlists(void)
308308{
309309- /* band-aid to fix the bar/list redrawing properly after leaving a plugin */
310310- send_event(GUI_EVENT_THEME_CHANGED, NULL);
311311- /* end bandaid */
309309+ /* band-aid to fix the bar/list redrawing properly after leaving a plugin */
310310+ send_event(GUI_EVENT_THEME_CHANGED, NULL);
311311+ /* end bandaid */
312312 gui_synclist_draw(&tree_lists);
313313}
314314···482482/* load tracks from specified directory to resume play */
483483void resume_directory(const char *dir)
484484{
485485- int dirfilter = *tc.dirfilter;
486486- int ret;
485485+ int dirfilter = *tc.dirfilter;
486486+ int ret;
487487#ifdef HAVE_TAGCACHE
488488 bool id3db = *tc.dirfilter == SHOW_ID3DB;
489489#endif
490490- /* make sure the dirfilter is sane. The only time it should be possible
491491- * thats its not is when resume playlist is called from a plugin
492492- */
490490+ /* make sure the dirfilter is sane. The only time it should be possible
491491+ * thats its not is when resume playlist is called from a plugin
492492+ */
493493#ifdef HAVE_TAGCACHE
494494- if (!id3db)
494494+ if (!id3db)
495495#endif
496496- *tc.dirfilter = global_settings.dirfilter;
497497- ret = ft_load(&tc, dir);
498498- *tc.dirfilter = dirfilter;
499499- if (ret < 0)
496496+ *tc.dirfilter = global_settings.dirfilter;
497497+ ret = ft_load(&tc, dir);
498498+ *tc.dirfilter = dirfilter;
499499+ if (ret < 0)
500500 return;
501501 lastdir[0] = 0;
502502