/[global]/global/htags/assoc.c
ViewVC logotype

Diff of /global/htags/assoc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by shigio, Thu Apr 7 10:20:07 2005 UTC revision 1.6 by shigio, Fri Apr 8 06:49:19 2005 UTC
# Line 42  Line 42 
42   *      i)      uniq    unique character   *      i)      uniq    unique character
43   *      r)              temporary file name   *      r)              temporary file name
44   */   */
45  static char *  static const char *
46  get_tmpfile(uniq)  get_tmpfile(uniq)
47          int uniq;          int uniq;
48  {  {
# Line 64  assoc_open(c) Line 64  assoc_open(c)
64          int c;          int c;
65  {  {
66          ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC));          ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC));
67          char *tmpfile = get_tmpfile(c);          const char *tmpfile = get_tmpfile(c);
68    
69          if (!assoc)          if (!assoc)
70                  die("short of memory.");                  die("short of memory.");
# Line 114  assoc_put(assoc, name, value) Line 114  assoc_put(assoc, name, value)
114   *      i)      name    name   *      i)      name    name
115   *      r)              value   *      r)              value
116   */   */
117  char *  const char *
118  assoc_get(assoc, name)  assoc_get(assoc, name)
119          ASSOC *assoc;          ASSOC *assoc;
120          const char *name;          const char *name;
121  {  {
         char *p;  
   
122          if (assoc->dbop == NULL)          if (assoc->dbop == NULL)
123                  abort();                  abort();
124          p = dbop_get(assoc->dbop, name);          return dbop_get(assoc->dbop, name);
   
         return p;  
125  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26