~ubuntu-branches/debian/lenny/libgsf/lenny

« back to all changes in this revision

Viewing changes to tests/test-ls-zip.c

  • Committer: Bazaar Package Importer
  • Author(s): J.H.M. Dassen (Ray)
  • Date: 2006-11-06 22:45:03 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061106224503-g6pmv1m82zy8jya9
Tags: 1.14.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * test-ls-zip.c: test program to list content of zip files.
4
4
 *
5
 
 * Copyright (C) 2002-2003      Tambet Ingo (tambet@ximian.com)
 
5
 * Copyright (C) 2002-2006      Tambet Ingo (tambet@ximian.com)
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or
8
8
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
15
15
 *
16
16
 * You should have received a copy of the GNU Lesser General Public License
17
17
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
19
19
 * USA
20
20
 */
21
21
 
33
33
{
34
34
        GsfInput  *input;
35
35
        GsfInfile *infile;
36
 
        GError    *err;
 
36
        GError    *err = NULL;
37
37
        gint       i, j;
38
38
 
39
39
        for (i = 1; i < argc; i++) {
40
40
                fprintf (stderr, "%s\n", argv [i]);
41
 
                input = GSF_INPUT (gsf_input_stdio_new (argv[i], &err));
 
41
                input = gsf_input_stdio_new (argv[i], &err);
42
42
                if (input == NULL) {
43
43
 
44
44
                        g_return_val_if_fail (err != NULL, 1);
49
49
                }
50
50
 
51
51
                input = gsf_input_uncompress (input);
52
 
                infile = GSF_INFILE (gsf_infile_zip_new (input, &err));
 
52
                infile = gsf_infile_zip_new (input, &err);
53
53
                g_object_unref (G_OBJECT (input));
54
54
 
55
55
                if (infile == NULL) {