~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/twain/tw_dump.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 *                     images.
60
60
 *  (07/23/04)  v0.6   Added Mac OS X support.
61
61
 */
62
 
#include <stdio.h>
 
62
 
 
63
#include "config.h"
 
64
 
63
65
#include <string.h>
 
66
 
 
67
#include <glib/gstdio.h>
 
68
 
64
69
#include "libgimp/gimp.h"
 
70
 
65
71
#include "tw_dump.h"
66
72
#include "tw_func.h"
67
73
#include "tw_util.h"
83
89
   * write to the root directory.  Simplistic, but
84
90
   * gets the job done.
85
91
   */
86
 
  outputFile = fopen(DUMP_FILE, "wb");
 
92
  outputFile = g_fopen(DUMP_FILE, "wb");
87
93
}
88
94
 
89
95
/*
103
109
  /* Keep going */
104
110
  return TRUE;
105
111
}
106
 
        
 
112
 
107
113
/*
108
114
 * dumpDataTransferCallback
109
115
 *
110
116
 * The following function is called for each memory
111
117
 * block that is transferred from the data source.
112
118
 */
113
 
int 
 
119
int
114
120
dumpDataTransferCallback(pTW_IMAGEINFO imageInfo,
115
121
                         pTW_IMAGEMEMXFER imageMemXfer,
116
122
                         void *clientData)
130
136
  /* Keep going */
131
137
  return TRUE;
132
138
}
133
 
        
 
139
 
134
140
/*
135
141
 * dumpEndTransferCallback
136
142
 *
187
193
  disableDS(twSession);
188
194
  closeDS(twSession);
189
195
  closeDSM(twSession);
190
 
                
 
196
 
191
197
  /* Close the dump file */
192
198
  fclose(outputFile);
193
199
 
217
223
   * write to the root directory.  Simplistic, but
218
224
   * gets the job done.
219
225
   */
220
 
  FILE *inputFile = fopen(DUMP_FILE, "rb");
 
226
  FILE *inputFile = g_fopen(DUMP_FILE, "rb");
221
227
 
222
228
  /*
223
229
   * Inform our application that we are getting ready
242
248
          1, imageMemXfer.BytesWritten, inputFile);
243
249
 
244
250
    /* Call the data transfer callback function */
245
 
    if (!(*twSession->transferFunctions->txfrDataCb) 
246
 
        (&imageInfo, 
247
 
         &imageMemXfer, 
 
251
    if (!(*twSession->transferFunctions->txfrDataCb)
 
252
        (&imageInfo,
 
253
         &imageMemXfer,
248
254
         twSession->clientData))
249
255
      return;
250
256