Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / libexif / test / test-value.c
blob715ce10f7ab7442b8f2b0226e7280206f910c736
1 /* test-value.c
3 * Copyright 2002 Lutz M\uffffller <lutz@users.sourceforge.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA.
21 #include <libexif/exif-utils.h>
22 #include <libexif/exif-data.h>
24 #include <stdio.h>
25 #include <stdlib.h>
27 int
28 main ()
30 ExifData *d;
31 ExifEntry *e;
32 char v[1024];
33 ExifSRational r = {1., 20.};
34 unsigned int i;
36 d = exif_data_new ();
37 if (!d) {
38 printf ("Error running exif_data_new()\n");
39 exit(13);
42 e = exif_entry_new ();
43 if (!e) {
44 printf ("Error running exif_entry_new()\n");
45 exit(13);
48 exif_content_add_entry (d->ifd[EXIF_IFD_0], e);
49 exif_entry_initialize (e, EXIF_TAG_SHUTTER_SPEED_VALUE);
50 exif_set_srational (e->data, exif_data_get_byte_order (d), r);
52 for (i = 30; i > 0; i--) {
53 printf ("Length %2i: '%s'\n", i,
54 exif_entry_get_value (e, v, i));
57 exif_entry_unref (e);
58 exif_data_unref (d);
60 return 0;