9 int main(int argc, char *argv[])
17 fprintf(stderr, "Usage: %s <file> \"<text>\"\n", argv[0]);
23 file = "/Mount/writetest.txt";
26 printf("Testing File Output...\n");
27 printf("file = '%s'\n", file);
28 printf("text = \"%s\"\n", text);
31 fp = fopen(file, "w");
33 fprintf(stderr, "Unable to open '%s' for writing\n", file);
37 //printf("fwrite('%s', %i, 1, %p)\n", argv[2], strlen(argv[2]), fp);
38 if( fwrite(text, strlen(text), 1, fp) == -1 )
40 fprintf(stderr, "Unable to write to '%s'\n", file);
45 printf("Wow, It worked!\n");