ING_DB
This commit is contained in:
parent
63d53fc8fe
commit
556f020f87
|
|
@ -0,0 +1 @@
|
||||||
|
# if (S_ALIGN + L_ALIGN + D_ALIGN) > 0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# endif
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
# include "amx.h"
|
||||||
|
|
||||||
|
bgn_append(scan_rel)
|
||||||
|
register int scan_rel;
|
||||||
|
{
|
||||||
|
register AMX_REL *r;
|
||||||
|
|
||||||
|
Qry_mode = AMX_APPEND;
|
||||||
|
Domains = 0;
|
||||||
|
if (scan_rel)
|
||||||
|
{
|
||||||
|
if (Scan_rel)
|
||||||
|
Relation = Scan_rel;
|
||||||
|
else
|
||||||
|
return (amxerror(189));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check APPEND permission */
|
||||||
|
qry_perm(r = Relation, "append");
|
||||||
|
|
||||||
|
fprintf(FILE_tmp, msg(150), ++AP_level);
|
||||||
|
# if (S_ALIGN + L_ALIGN + D_ALIGN) > 0
|
||||||
|
fprintf(FILE_tmp, msg(120));
|
||||||
|
# endif
|
||||||
|
fprintf(FILE_tmp, msg(152), ALIGNMENT(r->rel_wid));
|
||||||
|
if (scan_rel)
|
||||||
|
fprintf(FILE_tmp, msg(153), r->rel_wid);
|
||||||
|
else
|
||||||
|
fprintf(FILE_tmp, msg(183), r->rel_uniq, r->rel_uniq);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
end_append()
|
||||||
|
{
|
||||||
|
register AMX_REL *r;
|
||||||
|
|
||||||
|
r = Relation;
|
||||||
|
fprintf(FILE_tmp, msg(154), r->rel_uniq, r->rel_uniq);
|
||||||
|
fprintf(FILE_tmp, msg(158), AP_level--);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
# include "amx.h"
|
||||||
|
|
||||||
|
bgn_replace()
|
||||||
|
{
|
||||||
|
register AMX_REL *r;
|
||||||
|
register int len;
|
||||||
|
|
||||||
|
if (!(r = Scan_rel))
|
||||||
|
return (amxerror(199));
|
||||||
|
|
||||||
|
Qry_mode = AMX_REPLACE;
|
||||||
|
Domains = 0;
|
||||||
|
Relation = r;
|
||||||
|
|
||||||
|
/* check REPLACE permission */
|
||||||
|
qry_perm(r, "replace");
|
||||||
|
|
||||||
|
fprintf(FILE_tmp, msg(52), ++AP_level);
|
||||||
|
# if (S_ALIGN + L_ALIGN + D_ALIGN) > 0
|
||||||
|
fprintf(FILE_tmp, msg(120));
|
||||||
|
# endif
|
||||||
|
fprintf(FILE_tmp, msg(152), ALIGNMENT(len = r->rel_wid));
|
||||||
|
fprintf(FILE_tmp, msg(153), len);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
end_replace()
|
||||||
|
{
|
||||||
|
register AMX_REL *r;
|
||||||
|
register int uniq;
|
||||||
|
register char *repl;
|
||||||
|
char buf[100];
|
||||||
|
extern AMX_REL *getrel();
|
||||||
|
extern char get_replace();
|
||||||
|
|
||||||
|
r = Relation;
|
||||||
|
repl = buf;
|
||||||
|
Dom_set[Domains] = '\0';
|
||||||
|
while (r = getrel(r->rel_index, 0))
|
||||||
|
*repl++ = get_replace(r);
|
||||||
|
*repl = 0;
|
||||||
|
uniq = Relation->rel_uniq;
|
||||||
|
fprintf(FILE_tmp, msg(176), uniq, uniq, buf);
|
||||||
|
fprintf(FILE_tmp, msg(178), AP_level--);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char get_replace(r)
|
||||||
|
register AMX_REL *r;
|
||||||
|
{
|
||||||
|
register char *pdom;
|
||||||
|
register char *idom;
|
||||||
|
|
||||||
|
for (pdom = Dom_set; *pdom; pdom++)
|
||||||
|
for (idom = r->ind_dom; *idom; )
|
||||||
|
if (*idom++ == *pdom)
|
||||||
|
return ('1');
|
||||||
|
return ('0');
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue