- unsigned long counter, //temporal counter for loops like for or while
- counter2, //another temporal counter for sub loops
- size_file_output, //the size of the output file
- main_counter; //used in main
- char expected_flush=0; //used for checking flushing which can't be done
-
-
- // Print title, version and copyright
- printf("UNPPMC using range coder.\n");
- printf("Copyright (C) Arturo San Emeterio Campos 1999. All rights reserved.\n");
- printf("Permission is granted to make verbatim copies of this program for private\n");
- printf("use only. There is ABSOLUTELY NO WARRANTY. Use it at your OWN RISK.\n");
-
-
-
- // Check for correct number of parameters
- if(argc!=3)
- {
- printf("Bad number of arguments.\n");
- exit(1);
- }
-
-
- // Try to open input and output files
- if((file_input=fopen(argv[1],"r+b"))==NULL)
- {
- printf("Couldn't open %s.\n",argv[1]);
- exit(1);
- }
-
- if((file_output=fopen(argv[2],"w+b"))==NULL)
- {
- printf("Couldn't create %s.\n",argv[2]);
- exit(1);
- }
-
-
- // Get output length
- fread(&size_file_output,1,4,file_input);
-
+ unsigned long counter, //temporal counter for loops like for or while
+ counter2, //another temporal counter for sub loops
+ size_file_output, //the size of the output file
+ main_counter; //used in main
+ char expected_flush=0; //used for checking flushing which can't be done
+
+
+ // Print title, version and copyright
+ printf("UNPPMC using range coder.\n");
+ printf("Copyright (C) Arturo San Emeterio Campos 1999. All rights reserved.\n");
+ printf("Permission is granted to make verbatim copies of this program for private\n");
+ printf("use only. There is ABSOLUTELY NO WARRANTY. Use it at your OWN RISK.\n");
+
+
+
+ // Check for correct number of parameters
+ if(argc!=3)
+ {
+ printf("Bad number of arguments.\n");
+ exit(1);
+ }
+
+
+ // Try to open input and output files
+ if((file_input=fopen(argv[1],"r+b"))==NULL)
+ {
+ printf("Couldn't open %s.\n",argv[1]);
+ exit(1);
+ }
+
+ if((file_output=fopen(argv[2],"w+b"))==NULL)
+ {
+ printf("Couldn't create %s.\n",argv[2]);
+ exit(1);
+ }
+
+
+ // Get output length
+ fread(&size_file_output,1,4,file_input);
+