- if (0 == strcmp(p, "alpha"))
- return(ARCH_alpha);
- else if (0 == strcmp(p, "amd64"))
- return(ARCH_amd64);
- else if (0 == strcmp(p, "amiga"))
- return(ARCH_amiga);
- else if (0 == strcmp(p, "arc"))
- return(ARCH_arc);
- else if (0 == strcmp(p, "arm"))
- return(ARCH_arm);
- else if (0 == strcmp(p, "armish"))
- return(ARCH_armish);
- else if (0 == strcmp(p, "aviion"))
- return(ARCH_aviion);
- else if (0 == strcmp(p, "hp300"))
- return(ARCH_hp300);
- else if (0 == strcmp(p, "hppa"))
- return(ARCH_hppa);
- else if (0 == strcmp(p, "hppa64"))
- return(ARCH_hppa64);
- else if (0 == strcmp(p, "i386"))
- return(ARCH_i386);
- else if (0 == strcmp(p, "landisk"))
- return(ARCH_landisk);
- else if (0 == strcmp(p, "luna88k"))
- return(ARCH_luna88k);
- else if (0 == strcmp(p, "mac68k"))
- return(ARCH_mac68k);
- else if (0 == strcmp(p, "macppc"))
- return(ARCH_macppc);
- else if (0 == strcmp(p, "mvme68k"))
- return(ARCH_mvme68k);
- else if (0 == strcmp(p, "mvme88k"))
- return(ARCH_mvme88k);
- else if (0 == strcmp(p, "mvmeppc"))
- return(ARCH_mvmeppc);
- else if (0 == strcmp(p, "pmax"))
- return(ARCH_pmax);
- else if (0 == strcmp(p, "sgi"))
- return(ARCH_sgi);
- else if (0 == strcmp(p, "socppc"))
- return(ARCH_socppc);
- else if (0 == strcmp(p, "sparc"))
- return(ARCH_sparc);
- else if (0 == strcmp(p, "sparc64"))
- return(ARCH_sparc64);
- else if (0 == strcmp(p, "sun3"))
- return(ARCH_sun3);
- else if (0 == strcmp(p, "vax"))
- return(ARCH_vax);
- else if (0 == strcmp(p, "zaurus"))
- return(ARCH_zaurus);
-
- return(ARCH_DEFAULT);
-}
-
-
-enum mdoc_att
-mdoc_atoatt(const char *p)
-{
-
- assert(p);
- if (0 == strcmp(p, "v1"))
- return(ATT_v1);
- else if (0 == strcmp(p, "v2"))
- return(ATT_v2);
- else if (0 == strcmp(p, "v3"))
- return(ATT_v3);
- else if (0 == strcmp(p, "v4"))
- return(ATT_v4);
- else if (0 == strcmp(p, "v5"))
- return(ATT_v5);
- else if (0 == strcmp(p, "v6"))
- return(ATT_v6);
- else if (0 == strcmp(p, "v7"))
- return(ATT_v7);
- else if (0 == strcmp(p, "32v"))
- return(ATT_32v);
- else if (0 == strcmp(p, "V.1"))
- return(ATT_V1);
- else if (0 == strcmp(p, "V.2"))
- return(ATT_V2);
- else if (0 == strcmp(p, "V.3"))
- return(ATT_V3);
- else if (0 == strcmp(p, "V.4"))
- return(ATT_V4);
-
- return(ATT_DEFAULT);
-}
-
-
-char *
-mdoc_type2a(enum mdoc_type type)
-{
- switch (type) {
- case (MDOC_ROOT):
- return("root");
- case (MDOC_BLOCK):
- return("block");
- case (MDOC_HEAD):
- return("block-head");
- case (MDOC_BODY):
- return("block-body");
- case (MDOC_TAIL):
- return("block-tail");
- case (MDOC_ELEM):
- return("elem");
- case (MDOC_TEXT):
- return("text");