442
442
if (!(pos=get_form_pos(file,head,(TYPELIB*) 0)))
443
443
goto err; /* purecov: inspected */
444
VOID(my_seek(file,pos,MY_SEEK_SET,MYF(0)));
444
my_seek(file,pos,MY_SEEK_SET,MYF(0));
445
445
if (my_read(file,forminfo,288,MYF(MY_NABP)))
504
504
/* Read keyinformation */
505
505
key_info_length= (uint) uint2korr(head+28);
506
VOID(my_seek(file,(ulong) uint2korr(head+6),MY_SEEK_SET,MYF(0)));
506
my_seek(file,(ulong) uint2korr(head+6),MY_SEEK_SET,MYF(0));
507
507
if (read_string(file,(uchar**) &disk_buff,key_info_length))
508
508
goto err; /* purecov: inspected */
509
509
if (disk_buff[0] & 0x80)
722
722
if (pread(file, record, (size_t) share->reclength, record_offset) == 0)
723
723
goto err; /* purecov: inspected */
725
VOID(my_seek(file,pos+288,MY_SEEK_SET,MYF(0)));
725
my_seek(file,pos+288,MY_SEEK_SET,MYF(0));
727
727
share->fields= uint2korr(forminfo+258);
728
728
pos= uint2korr(forminfo+260); /* Length of all screens */
1519
1519
length=uint2korr(head+4);
1520
VOID(my_seek(file,64L,MY_SEEK_SET,MYF(0)));
1520
my_seek(file,64L,MY_SEEK_SET,MYF(0));
1521
1521
if (!(buf= (uchar*) my_malloc((size_t) length+a_length+names*4,
1522
1522
MYF(MY_WME))) ||
1523
1523
my_read(file, buf+a_length, (size_t) (length+names*4),
1595
1595
while (endpos > maxlength)
1597
VOID(my_seek(file,(ulong) (endpos-bufflength),MY_SEEK_SET,MYF(0)));
1597
my_seek(file,(ulong) (endpos-bufflength),MY_SEEK_SET,MYF(0));
1598
1598
if (my_read(file, buff, bufflength, MYF(MY_NABP+MY_WME)))
1600
VOID(my_seek(file,(ulong) (endpos-bufflength+IO_SIZE),MY_SEEK_SET,
1600
my_seek(file,(ulong) (endpos-bufflength+IO_SIZE),MY_SEEK_SET,
1602
1602
if ((my_write(file, buff,bufflength,MYF(MY_NABP+MY_WME))))
1604
1604
endpos-=bufflength; bufflength=IO_SIZE;
1606
1606
memset(buff, 0, IO_SIZE); /* Null new block */
1607
VOID(my_seek(file,(ulong) maxlength,MY_SEEK_SET,MYF(0)));
1607
my_seek(file,(ulong) maxlength,MY_SEEK_SET,MYF(0));
1608
1608
if (my_write(file,buff,bufflength,MYF(MY_NABP+MY_WME)))
1610
1610
maxlength+=IO_SIZE; /* Fix old ref */
1620
1620
if (n_length == 1 )
1621
1621
{ /* First name */
1623
VOID(strxmov((char*) buff,"/",newname,"/",NullS));
1623
strxmov((char*) buff,"/",newname,"/",NullS);
1626
VOID(strxmov((char*) buff,newname,"/",NullS)); /* purecov: inspected */
1627
VOID(my_seek(file,63L+(ulong) n_length,MY_SEEK_SET,MYF(0)));
1626
strxmov((char*) buff,newname,"/",NullS); /* purecov: inspected */
1627
my_seek(file,63L+(ulong) n_length,MY_SEEK_SET,MYF(0));
1628
1628
if (my_write(file, buff, (size_t) length+1,MYF(MY_NABP+MY_WME)) ||
1629
1629
(names && my_write(file,(uchar*) (*formnames->type_names+n_length-1),
1630
1630
names*4, MYF(MY_NABP+MY_WME))) ||
1996
1996
if (my_write(file,fill, IO_SIZE, MYF(MY_WME | MY_NABP)))
1998
VOID(my_close(file,MYF(0)));
1999
VOID(my_delete(name,MYF(0)));
1998
my_close(file,MYF(0));
1999
my_delete(name,MYF(0));
2054
2054
rename_file_ext(const char * from,const char * to,const char * ext)
2056
2056
char from_b[FN_REFLEN],to_b[FN_REFLEN];
2057
VOID(strxmov(from_b,from,ext,NullS));
2058
VOID(strxmov(to_b,to,ext,NullS));
2057
strxmov(from_b,from,ext,NullS);
2058
strxmov(to_b,to,ext,NullS);
2059
2059
return (my_rename(from_b,to_b,MYF(MY_WME)));