Mercurial > mplayer.hg
comparison gui/cfg.c @ 34591:73348cfa22e2
Use macro FF_ARRAY_ELEMS() instead of numeric constant.
author | ib |
---|---|
date | Fri, 10 Feb 2012 13:48:42 +0000 |
parents | 2c2fea8e9cc8 |
children | ddf8f24a93a6 |
comparison
equal
deleted
inserted
replaced
34590:2c2fea8e9cc8 | 34591:73348cfa22e2 |
---|---|
351 | 351 |
352 void cfg_write(void) | 352 void cfg_write(void) |
353 { | 353 { |
354 char *fname; | 354 char *fname; |
355 FILE *file; | 355 FILE *file; |
356 int i; | 356 unsigned int i; |
357 | 357 |
358 // configuration | 358 // configuration |
359 | 359 |
360 fname = get_path(GUI_CONFIGURATION); | 360 fname = get_path(GUI_CONFIGURATION); |
361 file = fopen(fname, "wt+"); | 361 file = fopen(fname, "wt+"); |
424 | 424 |
425 fname = get_path(GUI_HISTORY); | 425 fname = get_path(GUI_HISTORY); |
426 file = fopen(fname, "wt+"); | 426 file = fopen(fname, "wt+"); |
427 | 427 |
428 if (file) { | 428 if (file) { |
429 for (i = 0; i < 5; i++) | 429 for (i = 0; i < FF_ARRAY_ELEMS(fsHistory); i++) |
430 if (fsHistory[i]) | 430 if (fsHistory[i]) |
431 fprintf(file, "%s\n", fsHistory[i]); | 431 fprintf(file, "%s\n", fsHistory[i]); |
432 | 432 |
433 fclose(file); | 433 fclose(file); |
434 } | 434 } |