~ubuntu-branches/debian/experimental/mednafen/experimental

« back to all changes in this revision

Viewing changes to intl/relocatable.h

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-01-31 07:21:35 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20120131072135-es3dj12y00xcnrsk
Tags: 0.9.19-1
* New upstream WIP version.
* Update copyright information.
* Refresh use-system-tremor.patch and remove psx-big-endian-only.patch.
* Add spelling-fixes.patch based on Lintian's recommendations.
* Build-depend on debhelper 9 or later and remove corresponding Lintian
  override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Provide relocatable packages.
2
 
   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
2
   Copyright (C) 2003, 2005, 2008 Free Software Foundation, Inc.
3
3
   Written by Bruno Haible <bruno@clisp.org>, 2003.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify it
46
46
   instead of "/").  */
47
47
extern RELOCATABLE_DLL_EXPORTED void
48
48
       set_relocation_prefix (const char *orig_prefix,
49
 
                              const char *curr_prefix);
 
49
                              const char *curr_prefix);
50
50
 
51
51
/* Returns the pathname, relocated according to the current installation
52
 
   directory.  */
 
52
   directory.
 
53
   The returned string is either PATHNAME unmodified or a freshly allocated
 
54
   string that you can free with free() after casting it to 'char *'.  */
53
55
extern const char * relocate (const char *pathname);
54
56
 
55
 
/* Memory management: relocate() leaks memory, because it has to construct
56
 
   a fresh pathname.  If this is a problem because your program calls
57
 
   relocate() frequently, think about caching the result.  */
 
57
/* Memory management: relocate() potentially allocates memory, because it has
 
58
   to construct a fresh pathname.  If this is a problem because your program
 
59
   calls relocate() frequently, think about caching the result.  Or free the
 
60
   return value if it was different from the argument pathname.  */
58
61
 
59
62
/* Convenience function:
60
63
   Computes the current installation prefix, based on the original
61
64
   installation prefix, the original installation directory of a particular
62
 
   file, and the current pathname of this file.  Returns NULL upon failure.  */
63
 
extern const char * compute_curr_prefix (const char *orig_installprefix,
64
 
                                         const char *orig_installdir,
65
 
                                         const char *curr_pathname);
 
65
   file, and the current pathname of this file.
 
66
   Returns it, freshly allocated.  Returns NULL upon failure.  */
 
67
extern char * compute_curr_prefix (const char *orig_installprefix,
 
68
                                   const char *orig_installdir,
 
69
                                   const char *curr_pathname);
66
70
 
67
71
#else
68
72