Waitrud Weber’s blog

things and reminders for memories

3d: windows-make: the memorization is changed blured.

When we read the form file, the memorization is changed blured.
so, the problem is on the windows file system.

 

 

//
// : https://www.cprogrammingbasics.com/itoa-function-in-c/
int replace_csv ( char* form_file ) {
	char str_num[10];
	char* string;
	printf("replace_csv starts.\r\n");
	sleep(10);
	// if we read a file all, memorization is changed wrong.
	//string = read_all(form_file);

	for( int i =0; i<3; i++ ) {
		for( int j =0; j<3; j++ ) {
			sprintf( str_num, "$%d%d", i, j );
			printf("i %d j %d {%p} |%s|: ", i, j, csv[i][j], (char*)csv[i][j]);
			if ( csv[i][j] != nullptr )
				string = m_replace ( string, str_num, csv[i][j] );

//			printf("replace: %d %d |%s|%s|:\r\n|%s|\r\n", i, j, str_num, csv[i][j], string);
			sleep(1);
		}
	}

//	write_block( ".\\001-html-20210211-001\.txt", string );
	printf("replace_csv ends.\r\n");
	return -1;
}