1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #include <igl/stdin_to_temp.h>
- using namespace igl;
- #include <cstdio>
- using namespace std;
- int main(int argc,char * argv[])
- {
-
- for(int i = 1;i<argc;i++)
- {
- fprintf(stderr,"argv[%d] = %s\n",i,argv[i]);
- }
- FILE * temp_file;
- bool success = stdin_to_temp(&temp_file);
- if(!success)
- {
- fprintf(stderr,"Fatal Error: could not convert stdin to temp file\n");
-
- fclose(temp_file);
- return 1;
- }
-
-
- char c;
-
- while(fread(&c,sizeof(char),1,temp_file)==1)
- {
- fwrite(&c,sizeof(char),1,stdout);
- }
-
- fclose(temp_file);
- }
|