snprintf(buf, sizeof(buf), "%s%d.pgm", argv[1], i);
snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[1], i);
int main(int argc, char **argv){    int w, h, i;    char buf[1024];    if (argc != 2) {        printf("usage: %s file\n"               "generate a test video stream\n", argv[0]);        exit(1);    }#if 0    for(i=0;i<256;i++)        printf("cos(%d)=%d\n", i, int_cos(i));#endif    w = DEFAULT_WIDTH;    h = DEFAULT_HEIGHT;    rgb_tab = malloc(w * h * 3);    wrap = w * 3;    width = w;    height = h;    for(i=0;i<DEFAULT_NB_PICT;i++) {        snprintf(buf, sizeof(buf), "%s%d.pgm", argv[1], i);        gen_image(i, w, h);        pgmyuv_save(buf, w, h, rgb_tab);    }        free(rgb_tab);    return 0;}