just trying to read a goddamned file
Some checks failed
MVS Delete Members / delete-members (push) Failing after 13s
MVS Submit & Execute / upload-and-run (push) Failing after 50s

This commit is contained in:
Greg Gauthier 2026-02-08 15:57:09 +00:00
parent da147cd839
commit c0ce8c08b0

View File

@ -2,15 +2,25 @@
int main()
{
printf("Starting program - attempting fopen(dd:TESTDD, \"r\")\n");
printf((char *)"Program starting - about to fopen(dd:TESTDD, \"r\")\n");
FILE *fp = fopen("dd:TESTDD", "r");
FILE *fp;
char buf[256];
fp = fopen("dd:TESTDD", "r");
if (fp == NULL) {
printf("fopen returned NULL\n");
perror("fopen error");
printf((char *)"fopen returned NULL\n");
printf((char *)"fopen read failed\n");
return 1;
}
printf("fopen succeeded!\n");
/* rest unchanged */
printf((char *)"fopen succeeded!\n");
printf((char *)"Existing content:\n");
while (fgets(buf, 256, fp) != NULL) {
printf((char *)"%s", buf);
}
fclose(fp);
printf((char *)"Read complete.\n");
return 0;
}