};
void next_incremental(void);
+char **copy_argv(char **argv, int argc);
void free_argv(char **argv, int argc);
int table_num(char *table);
iu = xmalloc(sizeof(struct iupdate));
iu->table = table_name[table];
iu->beforec = beforec;
- iu->before = mr_copy_args(before, beforec);
+ iu->before = copy_argv(before, beforec);
iu->afterc = afterc;
- iu->after = mr_copy_args(after, afterc);
+ iu->after = copy_argv(after, afterc);
sq_save_data(incremental_sq, iu);
}
next_incremental();
}
+/* Pro*C 2.2.4 can't cope with the sigset_t below, at least in Solaris 2.6.
+ We add DEFINE=_PROC_ to the proc invocation and then #ifndef that around
+ this function so proc will pass it through without reading it. */
+#ifndef _PROC_
void next_incremental(void)
{
struct iupdate *iu;
free_argv(iu->after, iu->afterc);
free(iu);
}
-
+#endif
/* Called when the current transaction is aborted to throw away any queued
* incremental updates
}
+char **copy_argv(char **argv, int argc)
+{
+ char **ret = xmalloc(sizeof(char *) * argc);
+ while (--argc >= 0)
+ ret[argc] = xstrdup(strtrim(argv[argc]));
+ return ret;
+}
+
void free_argv(char **argv, int argc)
{
while (--argc >= 0)