summaryrefslogtreecommitdiff
path: root/src/generic/evas/xcf/main.c
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-06-20 09:42:50 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-06-23 10:28:13 +0200
commitc2be0d0dba1e11bcedbe41997fe0ea9b98014289 (patch)
tree4396268b896580b6ffea2e3d68fddd746d809fd6 /src/generic/evas/xcf/main.c
parent108ee1d485824a33047867b55f529e63fe11868c (diff)
Get rid of trailing whitespaces (3 / 14)
Remove trailing whitespaces Differential Revision: https://phab.enlightenment.org/D12001
Diffstat (limited to '')
-rw-r--r--src/generic/evas/xcf/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/generic/evas/xcf/main.c b/src/generic/evas/xcf/main.c
index 767c6bf4b1..d9e162dac6 100644
--- a/src/generic/evas/xcf/main.c
+++ b/src/generic/evas/xcf/main.c
@@ -275,7 +275,7 @@ static File *
275f_open(const char *file) 275f_open(const char *file)
276{ 276{
277 File *f; 277 File *f;
278 278
279 f = calloc(1, sizeof(File)); 279 f = calloc(1, sizeof(File));
280 if (!f) return NULL; 280 if (!f) return NULL;
281 f->fd = open(file, O_RDONLY); 281 f->fd = open(file, O_RDONLY);
@@ -304,13 +304,13 @@ f_close(File *f)
304 free(f); 304 free(f);
305} 305}
306 306
307#ifdef FBUF 307#ifdef FBUF
308static void 308static void
309_f_read_pos(File *f, long pos, long bytes) 309_f_read_pos(File *f, long pos, long bytes)
310{ 310{
311 long i, cnum; 311 long i, cnum;
312 Chunk **cks; 312 Chunk **cks;
313 313
314 if (f->size > 0) return; 314 if (f->size > 0) return;
315 cnum = ((pos + bytes) / CHUNK_SIZE) + 1; 315 cnum = ((pos + bytes) / CHUNK_SIZE) + 1;
316 if (f->chunk_num >= cnum) return; 316 if (f->chunk_num >= cnum) return;
@@ -343,19 +343,19 @@ _f_read_pos(File *f, long pos, long bytes)
343static long 343static long
344f_read(File *f, unsigned char *dest, long bytes) 344f_read(File *f, unsigned char *dest, long bytes)
345{ 345{
346#ifdef FBUF 346#ifdef FBUF
347 long done = 0, off = 0; 347 long done = 0, off = 0;
348 int c; 348 int c;
349 unsigned char *p; 349 unsigned char *p;
350 _f_read_pos(f, f->pos, bytes); 350 _f_read_pos(f, f->pos, bytes);
351 351
352 c = f->pos / CHUNK_SIZE; 352 c = f->pos / CHUNK_SIZE;
353 off = f->pos - (c * CHUNK_SIZE); 353 off = f->pos - (c * CHUNK_SIZE);
354 p = dest; 354 p = dest;
355 while ((done < bytes) && (c < f->chunk_num)) 355 while ((done < bytes) && (c < f->chunk_num))
356 { 356 {
357 long amount = bytes - done; 357 long amount = bytes - done;
358 358
359 if (!f->chunk[c]) break; 359 if (!f->chunk[c]) break;
360 if (amount > (f->chunk[c]->size - off)) 360 if (amount > (f->chunk[c]->size - off))
361 amount = (f->chunk[c]->size - off); 361 amount = (f->chunk[c]->size - off);
@@ -372,7 +372,7 @@ f_read(File *f, unsigned char *dest, long bytes)
372 long done = gzread(f->fp, dest, bytes); 372 long done = gzread(f->fp, dest, bytes);
373 f->pos += done; 373 f->pos += done;
374 return done; 374 return done;
375#endif 375#endif
376} 376}
377 377
378static void 378static void
@@ -383,14 +383,14 @@ f_seek(File *f, long pos)
383 { 383 {
384 if (pos >= f->size) pos = f->size -1; 384 if (pos >= f->size) pos = f->size -1;
385 } 385 }
386#endif 386#endif
387 if (f->pos == pos) return; 387 if (f->pos == pos) return;
388 f->pos = pos; 388 f->pos = pos;
389#ifdef FBUF 389#ifdef FBUF
390 _f_read_pos(f, f->pos, 1); 390 _f_read_pos(f, f->pos, 1);
391#else 391#else
392 gzseek(f->fp, f->pos, SEEK_SET); 392 gzseek(f->fp, f->pos, SEEK_SET);
393#endif 393#endif
394} 394}
395 395
396 396
@@ -1696,12 +1696,12 @@ main(int argc, char **argv)
1696 // int size_h = atoi(argv[i]); 1696 // int size_h = atoi(argv[i]);
1697 } 1697 }
1698 } 1698 }
1699 1699
1700 timeout_init(8); 1700 timeout_init(8);
1701 1701
1702 D("xcf_file_init\n"); 1702 D("xcf_file_init\n");
1703 if (!xcf_file_init(file)) return -1; 1703 if (!xcf_file_init(file)) return -1;
1704 1704
1705 D("size %i %i\n", image->width, image->height); 1705 D("size %i %i\n", image->width, image->height);
1706 if (!head_only) 1706 if (!head_only)
1707 { 1707 {