~ubuntu-branches/ubuntu/oneiric/evince/oneiric-updates

« back to all changes in this revision

Viewing changes to backend/dvi/mdvi-lib/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Josselin Mouette, Marc 'HE' Brockschmidt
  • Date: 2008-12-31 16:41:58 UTC
  • mfrom: (1.1.36 upstream)
  • mto: (1.5.1 sid)
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: james.westby@ubuntu.com-20081231164158-xnobl1sokvvc6ho8
Tags: 2.24.2-1
[ Josselin Mouette ]
* README.Debian: document that you need to install poppler-data.
  Closes: #506836.

[ Marc 'HE' Brockschmidt ]
* debian/control: Make the Gnome team maintainer. I'm not doing the job
   anyway.

[ Josselin Mouette ]
* New upstream release.
* Require nautilus 2.22 to build the extension for the correct 
  version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
}
116
116
#endif
117
117
 
118
 
void    message(const char *format, ...)
 
118
void    mdvi_message(const char *format, ...)
119
119
{
120
120
        va_list ap;
121
121
        
132
132
        va_end(ap);
133
133
}
134
134
 
135
 
void    crash(const char *format, ...)
 
135
void    mdvi_crash(const char *format, ...)
136
136
{
137
137
        va_list ap;
138
138
        
151
151
        abort();
152
152
}
153
153
 
154
 
void    error(const char *format, ...)
 
154
void    mdvi_error(const char *format, ...)
155
155
{
156
156
        va_list ap;
157
157
        
167
167
        va_end(ap);
168
168
}
169
169
 
170
 
void    warning(const char *format, ...)
 
170
void    mdvi_warning(const char *format, ...)
171
171
{
172
172
        va_list ap;
173
173
        
183
183
        va_end(ap);
184
184
}
185
185
 
186
 
void    fatal(const char *format, ...)
 
186
void    mdvi_fatal(const char *format, ...)
187
187
{
188
188
        va_list ap;
189
189
        
209
209
        void    *ptr = malloc(nelems);
210
210
        
211
211
        if(ptr == NULL)
212
 
                fatal(_("out of memory allocating %u bytes\n"),
213
 
                        (unsigned)nelems);
 
212
                mdvi_fatal(_("out of memory allocating %u bytes\n"),
 
213
                           (unsigned)nelems);
214
214
        return ptr;
215
215
}
216
216
 
219
219
        void    *ptr;
220
220
        
221
221
        if(newsize == 0)
222
 
                crash(_("attempted to reallocate with zero size\n"));
 
222
                mdvi_crash(_("attempted to reallocate with zero size\n"));
223
223
        ptr = realloc(data, newsize);
224
224
        if(ptr == NULL)
225
 
                fatal(_("failed to reallocate %u bytes\n"), (unsigned)newsize);
 
225
                mdvi_fatal(_("failed to reallocate %u bytes\n"), (unsigned)newsize);
226
226
        return ptr;     
227
227
}
228
228
 
231
231
        void    *ptr;
232
232
        
233
233
        if(nmemb == 0)
234
 
                crash(_("attempted to callocate 0 members\n"));
 
234
                mdvi_crash(_("attempted to callocate 0 members\n"));
235
235
        if(size == 0)
236
 
                crash(_("attempted to callocate %u members with size 0\n"),
 
236
                mdvi_crash(_("attempted to callocate %u members with size 0\n"),
237
237
                        (unsigned)nmemb);
238
238
        ptr = calloc(nmemb, size);
239
239
        if(ptr == 0)
240
 
                fatal(_("failed to allocate %ux%u bytes\n"),
241
 
                        (unsigned)nmemb, (unsigned)size);
 
240
                mdvi_fatal(_("failed to allocate %ux%u bytes\n"),
 
241
                           (unsigned)nmemb, (unsigned)size);
242
242
        return ptr;
243
243
}
244
244
 
245
245
void    mdvi_free(void *ptr)
246
246
{
247
247
        if(ptr == NULL)
248
 
                crash(_("attempted to free NULL pointer\n"));
 
248
                mdvi_crash(_("attempted to free NULL pointer\n"));
249
249
        free(ptr);
250
250
}
251
251