All pastes #618075 Raw Edit

Untitled

public text v1 · immutable
·published 2007-07-13 18:52 UTC
rendered paste body
  if(filename[0] == '\\') //If true, active multidirectory mode
  {
  	show_msg("Parsing the file system file....");
	//First we look for the file system config file
	FILE *fsys;
	fsys = fopen(mounted, "r");
	if(!fsys)
		return error(ERR_FILE);



	//Scan the file to have the malloc values
	do
	{
		bufsys = fgetc(fsys);
		if(bufsys != ':') {
			size_line++;
		} else if(bufsys == CR) {
			num_line++;
		} else {
			if(size_line > Fsize_line)
				Fsize_line = size_line;
		}
	}while(bufsys != EOF);

	char *title = malloc(2*sizeof(unsigned short));
	char *message = malloc(2*sizeof(unsigned short));
	sprintf(title, "%d", Fsize_line);
	sprintf(message, "%d", num_line);

	DlgMessage(title, message, BT_OK, BT_NONE);

  }