Add explanatory comments to the #endif part of multiple inclusion guards.
[mplayer/greg.git] / libvo / aspecttest.c
blob14791dfcb7288779cd74e23006198b6f41139552
1 /* testapp for aspect.[ch] by Atmos
2 * gcc aspecttest.c aspect.c -o aspecttest -DASPECT_TEST [-DASPECT_DEBUG]
3 */
5 #include <stdio.h>
6 #include <stdlib.h>
8 #include "aspect.h"
10 /* default zoom state 0 off, 1 on */
11 #define DEF_ZOOM 1
13 extern float monitor_aspect;
15 int main(int argc, char *argv[]) {
16 int w,h,z=DEF_ZOOM;
17 //printf("argc: %d\n",argc);
18 switch(argc) {
19 case 10:
20 z = atoi(argv[9]);
21 case 9:
22 monitor_aspect = (float)atoi(argv[7])/(float)atoi(argv[8]);
23 case 7:
24 aspect_save_prescale(atoi(argv[5]),atoi(argv[6]));
25 printf("prescale size: %sx%s\n",argv[5],argv[6]);
26 case 5:
27 aspect_save_screenres(atoi(argv[1]),atoi(argv[2]));
28 printf("screenres: %sx%s\n",argv[1],argv[2]);
29 aspect_save_orig(atoi(argv[3]),atoi(argv[4]));
30 printf("original size: %sx%s\n",argv[3],argv[4]);
31 w=atoi(argv[3]); h=atoi(argv[4]);
32 break;
33 default:
34 printf("USAGE: %s <screenw> <screenh> <origw> <origh>\n[<prescalew> "
35 "<prescaleh>] [<screenaspectw> <screenaspecth>] [<zoom 0/1>]\n",
36 argv[0]);
37 return 1;
39 printf("monitor_aspect: %f\n",monitor_aspect);
40 aspect(&w,&h,z);
41 printf("new size: %dx%d\n",w,h);
42 return 0;