265a266,270 > > // @LongLink addition > static char *long_name = NULL; > int use_long_name = false; > long long_link_size = 0; 267a273,291 > > // \todo and an option to use @LongLink > if ( strcmp(tar_hdr->name, "././@LongLink") == 0 /* && @LongLink option == true */) > { > // get length of data > long_link_size = FROM_OCTAL (tar_hdr->size); > // free the old memory and grab some fresh stuff > if (long_name != NULL) free (long_name); > long_name = (char *) xmalloc (long_link_size); > // read the file name from the data section of the archive > tape_buffered_read ((char*)long_name, in_des, long_link_size); > // since we now have the file name read out the remaining bytes to get an even 512 ( i used tar_rec to hold the data as I am not sure if i can send the output to /dev/null, and it gets overwriten int he next step anyway) > tape_buffered_read((char*) &tar_rec, in_des, 512 - long_link_size % 512); > // tell the if function down below to use the long name instead of the normal name given by the header > use_long_name = true; > // load header to real file > tape_buffered_read((char*) &tar_rec, in_des, TARRECORDSIZE); > } > 318a343,344 > else if ( use_long_name == true ) > file_hdr->c_name = &long_name;