the PtMultiText widget does not like large files yet??
It takes a huge amount of time, just to load a 200.000 byte
textfile …for the text to render in the widget.
perhaps there is a faster way to load text than this? )
some old sourcecode
/* open the file /
if((fp=fopen(info.path,“r”))==NULL)
{
}
else {
/ check the filesize and allocate memory /
if(stat(info.path, &buf) != -1) {
infil = (char)malloc(buf.st_size);
if(infil != NULL) {
file_ok=1;
}
}
}
if(file_ok==1) {
/* put the file in an array… */
while(ch != EOF)
{
ch=fgetc(fp);
infil[i++] = ch;
}
PtSetResource(ABW_textarea, Pt_ARG_TEXT_STRING,infil,NULL);
}
the PtMultiText widget does not like large files yet??
It takes a huge amount of time, just to load a 200.000 byte
textfile …for the text to render in the widget.
perhaps there is a faster way to load text than this? > > )
some old sourcecode
/* open the file /
if((fp=fopen(info.path,“r”))==NULL)
{
}
else {
/ check the filesize and allocate memory /
if(stat(info.path, &buf) != -1) {
infil = (char)malloc(buf.st_size);
if(infil != NULL) {
file_ok=1;
}
}
}
if(file_ok==1) {
/* put the file in an array… */
while(ch != EOF)
{
ch=fgetc(fp);
infil[i++] = ch;
}
PtSetResource(ABW_textarea, Pt_ARG_TEXT_STRING,infil,NULL);
}