466
466
if (!(pos=get_form_pos(file,head,(TYPELIB*) 0)))
467
467
goto err; /* purecov: inspected */
468
my_seek(file,pos,MY_SEEK_SET,MYF(0));
468
lseek(file,pos,SEEK_SET);
469
469
if (my_read(file,forminfo,288,MYF(MY_NABP)))
518
518
/* Read keyinformation */
519
519
key_info_length= (uint) uint2korr(head+28);
520
my_seek(file,(ulong) uint2korr(head+6),MY_SEEK_SET,MYF(0));
520
lseek(file,(ulong) uint2korr(head+6),SEEK_SET);
521
521
if (read_string(file,(unsigned char**) &disk_buff,key_info_length))
522
522
goto err; /* purecov: inspected */
523
523
if (disk_buff[0] & 0x80)
737
737
if (pread(file, record, (size_t) share->reclength, record_offset) == 0)
738
738
goto err; /* purecov: inspected */
740
my_seek(file,pos+288,MY_SEEK_SET,MYF(0));
740
lseek(file,pos+288,SEEK_SET);
742
742
share->fields= uint2korr(forminfo+258);
743
743
pos= uint2korr(forminfo+260); /* Length of all screens */
1901
1901
length=uint2korr(head+4);
1902
my_seek(file,64L,MY_SEEK_SET,MYF(0));
1902
lseek(file,64,SEEK_SET);
1903
1903
if (!(buf= (unsigned char*) malloc(length+a_length+names*4)) ||
1904
1904
my_read(file, buf+a_length, (size_t) (length+names*4),
1973
1973
{ /* Expand file */
1974
1974
newpos+=IO_SIZE;
1975
1975
int4store(fileinfo+10,newpos);
1976
endpos=(ulong) my_seek(file,0L,MY_SEEK_END,MYF(0));/* Copy from file-end */
1976
endpos= lseek(file,0,SEEK_END);/* Copy from file-end */
1977
1977
bufflength= (uint) (endpos & (IO_SIZE-1)); /* IO_SIZE is a power of 2 */
1979
1979
while (endpos > maxlength)
1981
my_seek(file,(ulong) (endpos-bufflength),MY_SEEK_SET,MYF(0));
1981
lseek(file,(off_t) (endpos-bufflength),SEEK_SET);
1982
1982
if (my_read(file, buff, bufflength, MYF(MY_NABP+MY_WME)))
1984
my_seek(file,(ulong) (endpos-bufflength+IO_SIZE),MY_SEEK_SET,
1984
lseek(file,(off_t) (endpos-bufflength+IO_SIZE),SEEK_SET);
1986
1985
if ((my_write(file, buff,bufflength,MYF(MY_NABP+MY_WME))))
1988
1987
endpos-=bufflength; bufflength=IO_SIZE;
1990
1989
memset(buff, 0, IO_SIZE); /* Null new block */
1991
my_seek(file,(ulong) maxlength,MY_SEEK_SET,MYF(0));
1990
lseek(file,(ulong) maxlength,SEEK_SET);
1992
1991
if (my_write(file,buff,bufflength,MYF(MY_NABP+MY_WME)))
1994
1993
maxlength+=IO_SIZE; /* Fix old ref */
2010
2009
strxmov((char*) buff,newname,"/",NULL); /* purecov: inspected */
2011
my_seek(file,63L+(ulong) n_length,MY_SEEK_SET,MYF(0));
2010
lseek(file, 63 + n_length,SEEK_SET);
2012
2011
if (my_write(file, buff, (size_t) length+1,MYF(MY_NABP+MY_WME)) ||
2013
2012
(names && my_write(file,(unsigned char*) (*formnames->type_names+n_length-1),
2014
2013
names*4, MYF(MY_NABP+MY_WME))) ||