/[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.8 by shigio, Sun Aug 28 12:14:32 2005 UTC revision 1.9 by shigio, Tue Oct 4 07:59:04 2005 UTC
# Line 55  Line 55 
55   *      r)              temporary file name   *      r)              temporary file name
56   */   */
57  static const char *  static const char *
58  get_tmpfile(uniq)  get_tmpfile(int uniq)
         int uniq;  
59  {  {
60          static char path[MAXPATHLEN];          static char path[MAXPATHLEN];
61          int pid = getpid();          int pid = getpid();
# Line 72  get_tmpfile(uniq) Line 71  get_tmpfile(uniq)
71   *      r)              descriptor   *      r)              descriptor
72   */   */
73  ASSOC *  ASSOC *
74  assoc_open(c)  assoc_open(int c)
         int c;  
75  {  {
76          ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC));          ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC));
77          const char *tmpfile = get_tmpfile(c);          const char *tmpfile = get_tmpfile(c);
# Line 92  assoc_open(c) Line 90  assoc_open(c)
90   *      i)      assoc   descriptor   *      i)      assoc   descriptor
91   */   */
92  void  void
93  assoc_close(assoc)  assoc_close(ASSOC *assoc)
         ASSOC *assoc;  
94  {  {
95          if (assoc == NULL)          if (assoc == NULL)
96                  return;                  return;
# Line 110  assoc_close(assoc) Line 107  assoc_close(assoc)
107   *      i)      value   value   *      i)      value   value
108   */   */
109  void  void
110  assoc_put(assoc, name, value)  assoc_put(ASSOC *assoc, const char *name, const char *value)
         ASSOC *assoc;  
         const char *name;  
         const char *value;  
111  {  {
112          if (assoc->dbop == NULL)          if (assoc->dbop == NULL)
113                  abort();                  abort();
# Line 127  assoc_put(assoc, name, value) Line 121  assoc_put(assoc, name, value)
121   *      r)              value   *      r)              value
122   */   */
123  const char *  const char *
124  assoc_get(assoc, name)  assoc_get(ASSOC *assoc, const char *name)
         ASSOC *assoc;  
         const char *name;  
125  {  {
126          if (assoc->dbop == NULL)          if (assoc->dbop == NULL)
127                  abort();                  abort();

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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