root/tags/5.4.pre05/mx.c

Revision 1, 2.6 kB (checked in by heitor.barbieri, 4 years ago)

Criação do svn para Cisis.

Line 
1/* ------------------------------ mx.c ------------------------------------- */
2
3/* Copyright (c) 1990-2005 Adalberto Otranto Tardelli. All rights reserved.
4 * Written by A.O.Tardelli 7/90
5 * Redistribution and use in source and binary forms are freely permitted
6 * provided that the above copyright notice and attribution and date of work
7 * and this paragraph are duplicated in all such forms.
8 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 * This program performs a MicroISIS master file dump, formatted display,
12 * search and record limits, pattern changes, data base join, field update,
13 * master file update and ISO-2709 processing. Input can also be a plain file.
14 * Field update commands now perform hierarchical parsing of a plain xml file,
15 * markup (e-vamp) of texts and support split of data contents, as trigrams.
16 * A description of this program is available in CISIS Interface Application -
17 * MX Program. Sao Paulo, BIREME - Latin American and Caribbean Center on
18 * Health Sciences Information/PAHO-WHO, April 1991. 12p. See also:
19 * - http://www.bireme.br (Products or IsisFamily/Cisis Utilities)
20 * Available via anonymous ftp:
21 * - ftp://ftp.bireme.br/cisis/pc/windows or
22 *   ftp://ftp.bireme.br/cisis/pc/linux
23 * Currently works with CISIS Interface 4.52 and BorlandC 5.02 or
24 * MSVC 6.0 or later for win32/console application and for Linux/gcc,
25 * among other platforms.  AOT, 11/01/2006.
26*/
27
28
29#ifndef MX_SERX
30#define MX_SERX   0
31#endif
32
33
34#if MX_SERX
35
36#include "serx.c"      /* AOT/serx.c source code */
37
38#else //MX_SERX
39
40#include <stdio.h>
41#include <string.h>
42
43#if CIAPI
44#include "ciapi.h"   /* CISIS Interface API header file - includes cisis, implements cirun.h and ci*.c using ci*.?pp
45                                                          the z3950server product used the wxis.c source code simply
46                                                          by #including ciapi.h
47                     */
48#else /* CIAPI */
49#include "cisis.h"   /* CISIS Interface header file */
50#include "cirun.h"   /* CISIS Interface runtime declarations */
51#endif /* CIAPI */
52
53void main(argc,argv)
54int argc;
55char *argv[];
56{
57    int rc;
58#if MXFUN
59    char area[BUFSIZ+BUFSIZ+1];
60    char *p;
61    int iarg;
62    for (p=area, iarg=1; iarg<argc; iarg++) {
63        strcpy(p,argv[iarg]); p+=strlen(p); if (iarg<argc-1) *p++='\n';
64    }
65    *p='\0';
66    rc=cisis_mx(area);
67#else /* MXFUN */
68    rc=mxexec(argc,argv);
69#endif /* MXFUN */
70    exit(rc);
71}
72
73#endif //MX_SERX
Note: See TracBrowser for help on using the browser.