Revision 2131e859

View differences:

tests/rotozoom.c
234 234
#define W 256
235 235
#define H 256
236 236

  
237
static void init_demo(const char *filename)
237
static int init_demo(const char *filename)
238 238
{
239 239
    int i, j;
240 240
    int h;
......
246 246
    fichier = fopen(filename, "rb");
247 247
    if (!fichier) {
248 248
        perror(filename);
249
        exit(1);
249
        return 1;
250 250
    }
251 251

  
252 252
    fread(line, 1, 15, fichier);
......
267 267
        h_cos[i] = h * int_sin(radian + MY_PI / 2) / 2 / FIXP;
268 268
        h_sin[i] = h * int_sin(radian)             / 2 / FIXP;
269 269
    }
270

  
271
  return 0;
270 272
}
271 273

  
272 274
int main(int argc, char **argv)
......
288 290
    width   = w;
289 291
    height  = h;
290 292

  
291
    init_demo(argv[2]);
293
    if (init_demo(argv[2]))
294
        return 1;
292 295

  
293 296
    for (i = 0; i < DEFAULT_NB_PICT; i++) {
294 297
        snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[1], i);

Also available in: Unified diff