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

« back to all changes in this revision

Viewing changes to tests/test-zip2.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-zip2.c:
4
4
 *
5
 
 * Copyright (C) 2002-2003 Jody Goldberg (jody@gnome.org)
 
5
 * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
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
 
29
29
#include <string.h>
30
30
 
31
31
static void
32
 
dump_child (GsfInfile *infile, const char * childname)
 
32
dump_child (GsfInfile *infile, char const *childname)
33
33
{
34
34
        GsfInput *child = gsf_infile_child_by_name (infile, childname);
35
35
        GsfInputTextline *textinput;
41
41
                return;
42
42
        }
43
43
 
44
 
        textinput = gsf_input_textline_new (child);
 
44
        textinput = (GsfInputTextline *)gsf_input_textline_new (child);
45
45
        if (textinput == NULL) {
46
46
                printf ("Could not read lines from %s",
47
47
                        gsf_input_name (child));
70
70
        int i;
71
71
 
72
72
        puts (argv[1]);
73
 
        input = GSF_INPUT (gsf_input_stdio_new (argv[1], &err));
 
73
        input = gsf_input_stdio_new (argv[1], &err);
74
74
        if (input == NULL) {
75
75
 
76
76
                g_return_val_if_fail (err != NULL, 1);
80
80
                return -1;
81
81
        }
82
82
 
83
 
        infile = GSF_INFILE (gsf_infile_zip_new (input, &err));
 
83
        infile = gsf_infile_zip_new (input, &err);
84
84
        if (infile == NULL) {
85
85
 
86
86
                g_return_val_if_fail (err != NULL, 1);