Stuff
public c v1 · immutable#include <stdio.h>#include <stdlib.h>#define MAX_LINE 50#define OFF_END -2int main(){ FILE * file; long fsize; char * buffer; file = fopen("map01.map","r"); if (file!=NULL) { char *s; char *p; s=p=(char *)malloc(MAX_LINE); while( ((*p=getc(file))!='\n') && (p<(s+OFF_END))) { p++; } *p='\0'; p=s; while( ((*p=getc(file))!='\n') && (p<(s+OFF_END))) { p++; } printf("%s\n",s); fclose(file); free(buffer); return 0; }}