~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Monty Taylor
  • Date: 2008-09-23 00:10:39 UTC
  • mto: This revision was merged to the branch mainline in revision 417.
  • Revision ID: monty@inaugust.com-20080923001039-cv4ve8om1kk5mgit
Removed __alpha__ references.
Removed VOID().

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
  error= 3;
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)))
446
446
    goto err;
447
447
 
503
503
 
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 */
724
724
 
725
 
  VOID(my_seek(file,pos+288,MY_SEEK_SET,MYF(0)));
 
725
  my_seek(file,pos+288,MY_SEEK_SET,MYF(0));
726
726
 
727
727
  share->fields= uint2korr(forminfo+258);
728
728
  pos= uint2korr(forminfo+260);                 /* Length of all screens */
1517
1517
  if (names)
1518
1518
  {
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),
1594
1594
 
1595
1595
    while (endpos > maxlength)
1596
1596
    {
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)))
1599
1599
        return(0L);
1600
 
      VOID(my_seek(file,(ulong) (endpos-bufflength+IO_SIZE),MY_SEEK_SET,
1601
 
                   MYF(0)));
 
1600
      my_seek(file,(ulong) (endpos-bufflength+IO_SIZE),MY_SEEK_SET,
 
1601
                   MYF(0));
1602
1602
      if ((my_write(file, buff,bufflength,MYF(MY_NABP+MY_WME))))
1603
1603
        return(0);
1604
1604
      endpos-=bufflength; bufflength=IO_SIZE;
1605
1605
    }
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)))
1609
1609
        return(0L);
1610
1610
    maxlength+=IO_SIZE;                         /* Fix old ref */
1620
1620
  if (n_length == 1 )
1621
1621
  {                                             /* First name */
1622
1622
    length++;
1623
 
    VOID(strxmov((char*) buff,"/",newname,"/",NullS));
 
1623
    strxmov((char*) buff,"/",newname,"/",NullS);
1624
1624
  }
1625
1625
  else
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))) ||
1995
1995
    {
1996
1996
      if (my_write(file,fill, IO_SIZE, MYF(MY_WME | MY_NABP)))
1997
1997
      {
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));
2000
2000
        return(-1);
2001
2001
      }
2002
2002
    }
2054
2054
rename_file_ext(const char * from,const char * to,const char * ext)
2055
2055
{
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)));
2060
2060
}
2061
2061