~ubuntu-branches/debian/stretch/psi-plus/stretch

« back to all changes in this revision

Viewing changes to src/libpsi/tools/zip/minizip/miniunz.c

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2013-10-23 02:42:20 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20131023024220-bk2hyoenqkwfhpgw
Tags: 0.16.242-1
* New upstream release:
  fixed the problem of initialization of private conversation when both
  sides use libotr 4.0.x. (Closes: #724880)
* Update debian/watch: sources were moved.
* Delete psi-plus-content-downloader package and update all related files.
  This plugin is in psi-plus-plugins package now.
* Update debian/control:
  - remove all currently unneeded Replaces and Breaks fields
  - add build dependency on libidn11-dev
* Update debian/rules: simplify get-orig-source section.
* Update debian/copyright:
  - update Source field due to changes in sources location
  - remove copyright holders whose code was deleted from source tree
    (bundled libidn library was removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
{
94
94
  char *buffer ;
95
95
  char *p;
96
 
  int  len = strlen(newdir);  
 
96
  int  len = strlen(newdir);
97
97
 
98
 
  if (len <= 0) 
 
98
  if (len <= 0)
99
99
    return 0;
100
100
 
101
101
  buffer = (char*)malloc(len+1);
102
102
  strcpy(buffer,newdir);
103
 
  
 
103
 
104
104
  if (buffer[len-1] == '/') {
105
105
    buffer[len-1] = '\0';
106
106
  }
140
140
}
141
141
 
142
142
void do_help()
143
 
{       
 
143
{
144
144
        printf("Usage : miniunz [-exvlo] file.zip [file_to_extract]\n\n") ;
145
145
}
146
146
 
223
223
    FILE *fout=NULL;
224
224
    void* buf;
225
225
    uInt size_buf;
226
 
        
 
226
 
227
227
        unz_file_info file_info;
228
228
        uLong ratio=0;
229
229
        err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
306
306
                        fout=fopen(write_filename,"wb");
307
307
 
308
308
            /* some zipfile don't contain directory alone before file */
309
 
            if ((fout==NULL) && ((*popt_extract_without_path)==0) && 
 
309
            if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
310
310
                                (filename_withoutpath!=(char*)filename_inzip))
311
311
            {
312
312
                char c=*(filename_withoutpath-1);
329
329
                        do
330
330
                        {
331
331
                                err = unzReadCurrentFile(uf,buf,size_buf);
332
 
                                if (err<0)      
 
332
                                if (err<0)
333
333
                                {
334
334
                                        printf("error %d with zipfile in unzReadCurrentFile\n",err);
335
335
                                        break;
344
344
                        }
345
345
                        while (err>0);
346
346
                        fclose(fout);
347
 
                        if (err==0) 
 
347
                        if (err==0)
348
348
                                change_file_date(write_filename,file_info.dosDate,
349
349
                                                     file_info.tmu_date);
350
350
                }
358
358
                    }
359
359
        }
360
360
        else
361
 
            unzCloseCurrentFile(uf); /* don't lose the error */       
 
361
            unzCloseCurrentFile(uf); /* don't lose the error */
362
362
        }
363
363
 
364
 
    free(buf);    
 
364
    free(buf);
365
365
    return err;
366
366
}
367
367
 
374
374
        uLong i;
375
375
        unz_global_info gi;
376
376
        int err;
377
 
        FILE* fout=NULL;        
 
377
        FILE* fout=NULL;
378
378
 
379
379
        err = unzGetGlobalInfo (uf,&gi);
380
380
        if (err!=UNZ_OK)
448
448
                        if ((*argv[i])=='-')
449
449
                        {
450
450
                                const char *p=argv[i]+1;
451
 
                                
 
451
 
452
452
                                while ((*p)!='\0')
453
 
                                {                       
 
453
                                {
454
454
                                        char c=*(p++);;
455
455
                                        if ((c=='l') || (c=='L'))
456
456
                                                opt_do_list = 1;