]> www.fi.muni.cz Git - evince.git/blobdiff - dvi/mdvi-lib/common.h
Allow the user to override document restrictions. Fix for bug 305818.
[evince.git] / dvi / mdvi-lib / common.h
index 67130feb7512cbfad75fbb618b034865b572d266..fe4d6f7084f88db0095633d12f9c9afa9cc09efb 100644 (file)
@@ -202,23 +202,19 @@ extern void __debug __PROTO((int, const char *, ...));
 
 /* memory allocation */
 
-extern void  xfree __PROTO((void *));
-extern void *xmalloc __PROTO((size_t));
-extern void *xrealloc __PROTO((void *, size_t));
-extern void *xcalloc __PROTO((size_t, size_t));
-extern char *xstrncpy __PROTO((char *, const char *, size_t));
-extern char *xstrdup __PROTO((const char *));
-extern char *xstrndup __PROTO((const char *, size_t));
-extern void *xmemdup __PROTO((const void *, size_t));
+extern void  mdvi_free __PROTO((void *));
+extern void *mdvi_malloc __PROTO((size_t));
+extern void *mdvi_realloc __PROTO((void *, size_t));
+extern void *mdvi_calloc __PROTO((size_t, size_t));
+extern char *mdvi_strncpy __PROTO((char *, const char *, size_t));
+extern char *mdvi_strdup __PROTO((const char *));
+extern char *mdvi_strndup __PROTO((const char *, size_t));
+extern void *mdvi_memdup __PROTO((const void *, size_t));
 
 /* macros to make memory allocation nicer */
-#define xalloc(t)      (t *)xmalloc(sizeof(t))
-#define xnalloc(t,n)   (t *)xcalloc((n), sizeof(t))
-#define xresize(p,t,n) (t *)xrealloc((p), (n) * sizeof(t))
-
-extern int get_number __PROTO((const char *, long *));
-/* return paper dimensions (in cm) */
-extern int paper_dimensions __PROTO((const char *, double *, double *));
+#define xalloc(t)      (t *)mdvi_malloc(sizeof(t))
+#define xnalloc(t,n)   (t *)mdvi_calloc((n), sizeof(t))
+#define xresize(p,t,n) (t *)mdvi_realloc((p), (n) * sizeof(t))
 
 extern char *xstradd __PROTO((char *, size_t *, size_t, const char *, size_t));
 
@@ -255,10 +251,8 @@ extern void dstring_reset __PROTO((Dstring *));
 extern char *dgets __PROTO((Dstring *, FILE *));
 extern int  file_readable __PROTO((const char *));
 extern int  file_exists __PROTO((const char *));
-extern char *find_in_path __PROTO((const char *path, const char *file));
 extern const char *file_basename __PROTO((const char *));
 extern const char *file_extension __PROTO((const char *));
-extern char *read_into_core __PROTO((const char *, size_t *));
 
 /*
  * Miscellaneous macros