* Sebastian Hammer, Adam Dickmeiss
*
* $Log: bfile.c,v $
- * Revision 1.29 1999-05-26 07:49:12 adam
+ * Revision 1.30 1999-10-14 14:33:49 adam
+ * Added truncation 5=106.
+ *
+ * Revision 1.29 1999/05/26 07:49:12 adam
* C++ compilation.
*
* Revision 1.28 1999/05/12 13:08:05 adam
bfs->commit_area = NULL;
bfs->register_area = mf_init("register", spec);
bfs->lockDir = NULL;
+ if (!bfs->register_area)
+ {
+ bfs_destroy(bfs);
+ return 0;
+ }
return bfs;
}
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: mfile.c,v $
- * Revision 1.34 1999-05-26 07:49:12 adam
+ * Revision 1.35 1999-10-14 14:33:50 adam
+ * Added truncation 5=106.
+ *
+ * Revision 1.34 1999/05/26 07:49:12 adam
* C++ compilation.
*
* Revision 1.33 1999/05/12 13:08:06 adam
dirname[i] = '\0';
if (*ad++ != ':')
{
- logf (LOG_FATAL, "Missing colon after path: %s", ad0);
+ logf (LOG_WARN, "Missing colon after path: %s", ad0);
return -1;
}
if (i == 0)
{
- logf (LOG_FATAL, "Empty path: %s", ad0);
+ logf (LOG_WARN, "Empty path: %s", ad0);
return -1;
}
while (*ad == ' ' || *ad == '\t')
{
if (!mf->wr && errno == ENOENT && off == 0)
return -2;
- logf (LOG_FATAL|LOG_ERRNO, "Failed to open %s", mf->files[c].path);
+ logf (LOG_WARN|LOG_ERRNO, "Failed to open %s", mf->files[c].path);
return -1;
}
if (lseek(mf->files[c].fd, (ps = pos - off) * mf->blocksize + offset,
SEEK_SET) < 0)
{
- logf (LOG_FATAL|LOG_ERRNO, "Failed to seek in %s", mf->files[c].path);
+ logf (LOG_WARN|LOG_ERRNO, "Failed to seek in %s", mf->files[c].path);
return -1;
}
mf->cur_file = c;
ma->dirs = 0;
if (scan_areadef(ma, name, spec) < 0)
{
- logf (LOG_FATAL, "Failed to access description of '%s'", name);
+ logf (LOG_WARN, "Failed to access description of '%s'", name);
return 0;
}
/* look at each directory */
{
if (!(dd = opendir(dirp->name)))
{
- logf (LOG_FATAL|LOG_ERRNO, "Failed to open %s", dirp->name);
+ logf (LOG_WARN|LOG_ERRNO, "Failed to open directory %s",
+ dirp->name);
return 0;
}
/* look at each file */
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: main.c,v $
- * Revision 1.71 1999-09-08 12:12:06 adam
+ * Revision 1.72 1999-10-14 14:33:50 adam
+ * Added truncation 5=106.
+ *
+ * Revision 1.71 1999/09/08 12:12:06 adam
* Fixed bad message.
*
* Revision 1.70 1999/09/07 07:19:21 adam
rGroupDef.bfs =
bfs_create (res_get (common_resource, "register"));
+ if (!rGroupDef.bfs)
+ {
+ logf (LOG_FATAL, "Cannot access register");
+ exit(1);
+ }
bf_lockDir (rGroupDef.bfs,
res_get (common_resource, "lockDir"));
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zebraapi.c,v $
- * Revision 1.23 1999-09-07 11:36:32 adam
+ * Revision 1.24 1999-10-14 14:33:50 adam
+ * Added truncation 5=106.
+ *
+ * Revision 1.23 1999/09/07 11:36:32 adam
* Minor changes.
*
* Revision 1.22 1999/08/02 10:13:47 adam
zebra_chdir (zh);
zebra_server_lock_init (zh);
zh->dh = data1_create ();
+ if (!zh->dh)
+ {
+ zebra_server_lock_destroy (zh);
+ xfree (zh);
+ return 0;
+ }
zh->bfs = bfs_create (res_get (zh->res, "register"));
+ if (!zh->bfs)
+ {
+ zebra_server_lock_destroy (zh);
+ data1_destroy(zh->dh);
+ xfree (zh);
+ return 0;
+ }
bf_lockDir (zh->bfs, res_get (zh->res, "lockDir"));
data1_set_tabpath (zh->dh, res_get(zh->res, "profilePath"));
zh->sets = NULL;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zrpn.c,v $
- * Revision 1.96 1999-09-23 10:05:05 adam
+ * Revision 1.97 1999-10-14 14:33:50 adam
+ * Added truncation 5=106.
+ *
+ * Revision 1.96 1999/09/23 10:05:05 adam
* Implemented structure=105 searching.
*
* Revision 1.95 1999/09/07 07:19:21 adam
return i;
}
-/* term_105: handle term, where trunc=Process # and ! and right trunc */
+/* term_105/106: handle term, where trunc=Process # and ! and right trunc */
static int term_105 (ZebraMaps zebra_maps, int reg_type,
const char **src, char *dst, int space_split,
- char *dst_term)
+ char *dst_term, int right_truncate)
{
const char *s0, *s1;
const char **map;
}
}
}
- dst[i++] = '.';
- dst[i++] = '*';
+ if (right_truncate)
+ {
+ dst[i++] = '.';
+ dst[i++] = '*';
+ }
dst[i] = '\0';
dst_term[j++] = '\0';
case 105: /* process * and ! in term */
term_dict[j++] = '(';
if (!term_105 (zh->zebra_maps, reg_type,
- &termp, term_dict + j, space_split, term_dst))
+ &termp, term_dict + j, space_split, term_dst, 1))
+ return 0;
+ strcat (term_dict, ")");
+ r = dict_lookup_grep (zh->dict, term_dict, 0, grep_info,
+ &max_pos, 0, grep_handle);
+ if (r)
+ logf (LOG_WARN, "dict_lookup_grep err, trunc=*/!: %d", r);
+ break;
+ case 106: /* process * and ! in term */
+ term_dict[j++] = '(';
+ if (!term_105 (zh->zebra_maps, reg_type,
+ &termp, term_dict + j, space_split, term_dst, 0))
return 0;
strcat (term_dict, ")");
r = dict_lookup_grep (zh->dict, term_dict, 0, grep_info,