home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / diskfile / star131.sit / suntar1.3.1 source updater < prev    next >
Encoding:
Text File  |  1992-07-04  |  700 b   |  28 lines

  1. file tar.c
  2.  
  3. unsigned char get_linkflag(length)
  4. long *length;
  5. {
  6. unsigned char linkflag;
  7.     if(bar_archive){
  8.         linkflag=guess_bar_linkflag();
  9.         *length=untar_number( ((barh_type*)disk_buffer)->size,true);
  10.         if(linkflag=='1'||linkflag=='5') *length=0;
  11.         }
  12.     else{
  13.         /* for directories, the size field may be used to store some informations,
  14.         hence I can't rely on it being 0 */
  15.         linkflag=((tarh_type*)disk_buffer)->linkflag;
  16.         if(linkflag=='5' || ((tarh_type*)disk_buffer)->name[
  17.             strlen(((tarh_type*)disk_buffer)->name)-1] == '/'){
  18.             linkflag='5';
  19.             *length=0;
  20.             }
  21.         else if(linkflag=='V')
  22.             *length=0;
  23.         else
  24.             *length=untar_number(((tarh_type*)disk_buffer)->size,true);
  25.         }
  26.     return linkflag;
  27. }
  28.