Waitrud Weber’s blog

things and reminders for memories

CodeAnalyzer : windows-make: We create the function for the read well.

We create the function for the read a file all at once.
The process is improved fast.

---
> .\winmain_001.exe
int main ( int argc, char** argv ) starts.
int read_html_tag_002(char* filename ) starts.
read_all_003 starts.
read_all_003 ends.|00377D18|size:1084|
int a_function (char* html_string, HTMLTAG* tag_html) starts.
p_dummy|<p>&| i: 0/1084 in file.
We found the |<| index 0 fp|0|.
---

*
The source code is very simple and the below:

 

.\replace.cpp  Sun Oct 16 21:53:50 2022
...
317 :
318 :char* read_all_003 (char* filename ) {
319 :	FILE *fp;
320 :	int file_end;
321 :	char* l_dummy=NULL;
322 :	printf("read_all_003 starts.\r\n");
323 :
324 :	fp = fopen(filename, "rb");
325 :	file_end = filesize(fp);
326 :	l_dummy = char_string(file_end);
327 :	fread ( l_dummy, 1, file_end, fp );
328 :
329 :	fclose(fp);
330 :	printf("read_all_003 ends.|%p|size:%d|\r\n", (char*) l_dummy, file_end );
331 :	return l_dummy;
332 :}
333 :
...