home *** CD-ROM | disk | FTP | other *** search
- file tar.c
-
- unsigned char get_linkflag(length)
- long *length;
- {
- unsigned char linkflag;
- if(bar_archive){
- linkflag=guess_bar_linkflag();
- *length=untar_number( ((barh_type*)disk_buffer)->size,true);
- if(linkflag=='1'||linkflag=='5') *length=0;
- }
- else{
- /* for directories, the size field may be used to store some informations,
- hence I can't rely on it being 0 */
- linkflag=((tarh_type*)disk_buffer)->linkflag;
- if(linkflag=='5' || ((tarh_type*)disk_buffer)->name[
- strlen(((tarh_type*)disk_buffer)->name)-1] == '/'){
- linkflag='5';
- *length=0;
- }
- else if(linkflag=='V')
- *length=0;
- else
- *length=untar_number(((tarh_type*)disk_buffer)->size,true);
- }
- return linkflag;
- }
-