// (c) 1991-2007 Electronic Arts Inc.

const char *SPIT_history[] =
{
"------------------------------------------------------------------",
"                                                                  ",
"                           ZHelp v1.43                            ",
"                                                                  ",
"                     by FrANK G. Barchard, EAC                    ",
"                                                                  ",
"                   Main program - May 07, 2003                    ",
"                                                                  ",
"------------------------------------------------------------------",
"                                                                  ",
" Version Date   History:                                          ",
" ------- ------ --------                                          ",
"    1.00 960207 get web help on topic                             ",
"    1.01 960208 -psx etc short cuts to all directories            ",
"    1.02 960208 lib functions in functions folder now             ",
"    1.03 960220 use 'start' for win95                             ",
"    1.04 960417 topic list                                        ",
"    1.05 960509 n64                                               ",
"    1.06 970306 default to win help                               ",
"    1.07 000128 -ps2                                              ",
"    1.08 010210 -gc                                               ",
"    1.09 010215 topics: fsh, gsh etc                              ",
"    1.10 010330 -ftp for ea ftp browser                           ",
"    1.11 010422 tools.eac.ea.com                                  ",
"    1.12 010430 -pcu for untested etc                             ",
"    1.13 010506 shortcut require exact match                      ",
"    1.14 010507 tools shortcuts                                   ",
"    1.15 010529 -unix                                             ",
"    1.16 010529 enviro.eac.ea.com                                 ",
"    1.17 010802 xdk                                               ",
"    1.18 010925 spit tools                                        ",
"    1.19 011002 tags, recurse, ftp browser no slash, ash          ",
"    1.20 011016 pcu                                               ",
"    1.21 011021 gss etc same as gsh etc                           ",
"    1.22 020208 real and passwords                                ",
"    1.23 020301 new enviro structure                              ",
"    1.24 020311 ffn etc                                           ",
"    1.25 020401 dev logs                                          ",
"    1.26 020409 fontwiz/p2                                        ",
"    1.27 020418 viv reference file format                         ",
"    1.28 020423 gimex/release folder                              ",
"    1.29 020521 zhelp gimex file formats (ie mpc)                 ",
"    1.30 020523 headers and web root technologies                 ",
"    1.31 020527 -? help                                           ",
"    1.32 020611 freetype, acdsee, tar                             ",
"    1.33 020618 shpinfo, fontinfo                                 ",
"    1.34 020620 vi,madcow                                         ",
"    1.35 020720 codex index                                       ",
"    1.36 020722 link,msdn                                         ",
"    1.37 020813 people pages                                      ",
"    1.38 020911 vivview, siggraph                                 ",
"    1.39 020920 mvcodec                                           ",
"    1.40 021010 depot                                             ",
"    1.41 021014 color hex values, wiki, locale                    ",
"    1.43 030507 msdn                                              ",
"                                                                  ",
"------------------------------------------------------------------",
"\0"
};

/****************************************************************/
/*  Spit Setup                                                  */
/****************************************************************/

#include "spit.h"

const char TextVersion[]="1.43 (Samba) 2007.12.4";
#define TOOL_VERSION 141
#define TOOL_NAME "zhelp"

char OPTzhelpurl[SPITMAXLINE];
char OPTwhere[SPITMAXLINE];

struct pages
{
    char *cut;
    char *url;
} pages[]=
{
    // sdk/platforms

    "real",     "http://tools.eac.ea.com/real/",
    "mvcodec",  "http://tools.eac.ea.com/mvcodec/",
    "eagl",     "http://tools.eac.ea.com/eagl/",
    "audio",    "http://tools.eac.ea.com/audio/",
    "gx",       "http://tools.eac.ea.com/gx/",
    "mpc",      "http://tools.eac.ea.com/mpegkit/",
    "fontwiz",  "http://tools.eac.ea.com/fontwiz/",
    "p2",       "http://tools.eac.ea.com/p2/",
    "passwords","http://tools.eac.ea.com/passwords/",
    "devreal",  "http://tools.eac.ea.com/real/pc/functions/devreal.htm",
    "pc",       "http://tools.eac.ea.com/real/pc/functions/",
    "win",      "http://tools.eac.ea.com/real/pc/functions/",
    "win95",    "http://tools.eac.ea.com/real/pc/functions/",
    "ps2",      "http://tools.eac.ea.com/real/ps2/functions/",
    "sony",     "http://tools.eac.ea.com/real/ps2/functions/",
    "gc",       "http://tools.eac.ea.com/real/gc/functions/",
    "xbox",     "http://tools.eac.ea.com/real/xbox/functions/",
    "unix",     "http://tools.eac.ea.com/real/unix/functions/",
    "gimex",    "http://tools.eac.ea.com/gimex/release/functions/",
    "tools",    "http://tools.eac.ea.com/",
    "locale",   "http://tools.eac.ea.com/locale",

    // real
    "pcu",       "http://tools.eac.ea.com/realunofficial/pc/functions/",
    "ps2u",      "http://tools.eac.ea.com/realunofficial/ps2/functions/",
    "gcu",       "http://tools.eac.ea.com/realunofficial/gc/functions/",
    "xboxu",     "http://tools.eac.ea.com/realunofficial/xbox/functions/",
    "unixu",     "http://tools.eac.ea.com/realunofficial/unix/functions/",
    "gimexu",    "http://tools.eac.ea.com/realunofficial/gimex/release/",
    "toolsu",    "http://tools.eac.ea.com/realunofficial/",
    "gxu",       "http://tools.eac.ea.com/realunofficial/gx/",

    // real headers
    "realbase",  "http://tools.eac.ea.com/real/pc/functions/realbaseh.htm",
    "realcodec", "http://tools.eac.ea.com/real/pc/functions/realcodech.htm",
    "realdebug", "http://tools.eac.ea.com/real/pc/functions/realdebugh.htm",
    "realfile",  "http://tools.eac.ea.com/real/pc/functions/realfileh.htm",
    "realfont",  "http://tools.eac.ea.com/real/pc/functions/realfonth.htm",
    "realgraph", "http://tools.eac.ea.com/real/pc/functions/realgraphh.htm",
    "realinput", "http://tools.eac.ea.com/real/pc/functions/realinputh.htm",
    "realmath",  "http://tools.eac.ea.com/real/pc/functions/realmathh.htm",
    "realmathplus","http://tools.eac.ea.com/real/pc/functions/realmathplush.htm",
    "realmem",   "http://tools.eac.ea.com/real/pc/functions/realmemh.htm",
    "realshape", "http://tools.eac.ea.com/real/pc/functions/realshapeh.htm",
    "realsystem","http://tools.eac.ea.com/real/pc/functions/realsystemh.htm",

    "base",  "http://tools.eac.ea.com/real/pc/functions/realbaseh.htm",
    "codec", "http://tools.eac.ea.com/real/pc/functions/realcodech.htm",
    "debug", "http://tools.eac.ea.com/real/pc/functions/realdebugh.htm",
    "file",  "http://tools.eac.ea.com/real/pc/functions/realfileh.htm",
    "font",  "http://tools.eac.ea.com/real/pc/functions/realfonth.htm",
    "graph", "http://tools.eac.ea.com/real/pc/functions/realgraphh.htm",
    "input", "http://tools.eac.ea.com/real/pc/functions/realinputh.htm",
    "math",  "http://tools.eac.ea.com/real/pc/functions/realmathh.htm",
    "mathplus","http://tools.eac.ea.com/real/pc/functions/realmathplush.htm",
    "mem",   "http://tools.eac.ea.com/real/pc/functions/realmemh.htm",
    "shape", "http://tools.eac.ea.com/real/pc/functions/realshapeh.htm",
    "system","http://tools.eac.ea.com/real/pc/functions/realsystemh.htm",
    "realcomm",  "http://tools.eac.ea.com/comm",
    "comm",      "http://tools.eac.ea.com/comm",
    "rcmp",      "http://tools.eac.ea.com/moviekit",
    "moviekit",  "http://tools.eac.ea.com/moviekit",

    // real headers unofficial
    "realbaseu",  "http://tools.eac.ea.com/realunofficial/pc/functions/realbaseh.htm",
    "realcodecu", "http://tools.eac.ea.com/realunofficial/pc/functions/realcodech.htm",
    "realdebugu", "http://tools.eac.ea.com/realunofficial/pc/functions/realdebugh.htm",
    "realfileu",  "http://tools.eac.ea.com/realunofficial/pc/functions/realfileh.htm",
    "realfontu",  "http://tools.eac.ea.com/realunofficial/pc/functions/realfonth.htm",
    "realgraphu", "http://tools.eac.ea.com/realunofficial/pc/functions/realgraphh.htm",
    "realinputu", "http://tools.eac.ea.com/realunofficial/pc/functions/realinputh.htm",
    "realmathu",  "http://tools.eac.ea.com/realunofficial/pc/functions/realmathh.htm",
    "realmathplusu","http://tools.eac.ea.com/realunofficial/pc/functions/realmathplush.htm",
    "realmemu",   "http://tools.eac.ea.com/realunofficial/pc/functions/realmemh.htm",
    "realshapeu", "http://tools.eac.ea.com/realunofficial/pc/functions/realshapeh.htm",
    "realsystemu","http://tools.eac.ea.com/realunofficial/pc/functions/realsystemh.htm",


    // shapes

    "fsh",      "http://tools.eac.ea.com/gimex/release/formats/fsh.htm",
    "ssh",      "http://tools.eac.ea.com/gimex/release/formats/ssh.htm",
    "xsh",      "http://tools.eac.ea.com/gimex/release/formats/xsh.htm",
    "gsh",      "http://tools.eac.ea.com/gimex/release/formats/gsh.htm",
    "msh",      "http://tools.eac.ea.com/gimex/release/formats/msh.htm",
    "ash",      "http://tools.eac.ea.com/gimex/release/formats/ash.htm",
    "psh",      "http://tools.eac.ea.com/gimex/release/formats/psh.htm",
    "nsh",      "http://tools.eac.ea.com/gimex/release/formats/nsh.htm",

    // shapes

    "fss",      "http://tools.eac.ea.com/gimex/release/formats/fsh.htm",
    "sss",      "http://tools.eac.ea.com/gimex/release/formats/ssh.htm",
    "xss",      "http://tools.eac.ea.com/gimex/release/formats/xsh.htm",
    "gss",      "http://tools.eac.ea.com/gimex/release/formats/gsh.htm",
    "mss",      "http://tools.eac.ea.com/gimex/release/formats/msh.htm",
    "ass",      "http://tools.eac.ea.com/gimex/release/formats/ash.htm",
    "pss",      "http://tools.eac.ea.com/gimex/release/formats/psh.htm",
    "nss",      "http://tools.eac.ea.com/gimex/release/formats/nsh.htm",

    // font

    "font",     "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "ffn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "sfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "xfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "gfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "mfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "afn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "pfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",
    "nfn",      "http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm",

    // bigfile
    "viv",      "http://tools.eac.ea.com/gimex/release/formats/viv.htm",

    // ftp browser

    "enviro",           "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/",
    "enviro/util/pc",   "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/util/release/pc/",
    "enviro/xbox",      "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/",
    "xdk",              "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/secure/",
    "enviro/gc",        "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/gc/",
    "enviro/ps2",       "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/",
    "enviro/3rdparty/ps2/sn",    "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/",
    "enviro/3dtools/ea3",       "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/",
    "ea3",              "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/",
    "enviro/eagl/eagl",      "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/eagl/eagl/",
    "sn",               "http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/",

    // tools/utils

    "util",      "http://tools.eac.ea.com/util/index.htm",
    "devfontwiz","http://tools.eac.ea.com/util/devfontwiz.htm",
    "devtools", "http://tools.eac.ea.com/util/devtools.htm",
    "devgimex", "http://tools.eac.ea.com/gimex/release/functions/devlib.htm",
    "gx",       "http://tools.eac.ea.com/util/gx.htm",
    "gcmp",     "http://tools.eac.ea.com/util/gcmp.htm",
    "ginfo",    "http://tools.eac.ea.com/util/ginfo.htm",
    "gshow",    "http://tools.eac.ea.com/util/gshow.htm",
    "gclip",    "http://tools.eac.ea.com/util/gclip.htm",
    "gis",      "http://tools.eac.ea.com/util/gis.htm",
    "cramany",  "http://tools.eac.ea.com/util/cramany.htm",
    "acdc",     "http://tools.eac.ea.com/util/acdc.htm",
    "abstract", "http://tools.eac.ea.com/util/abstract.htm",
    "author",   "http://tools.eac.ea.com/util/author.htm",
    "bingrep",  "http://tools.eac.ea.com/util/bingrep.htm",
    "bmw",      "http://tools.eac.ea.com/util/bmw.htm",
    "cdu",      "http://tools.eac.ea.com/util/cdu.htm",
    "chimp",    "http://tools.eac.ea.com/util/chimp.htm",
    "cmp",      "http://tools.eac.ea.com/util/cmp.htm",
    "copyr",    "http://tools.eac.ea.com/util/copyr.htm",
    "crc",      "http://tools.eac.ea.com/util/crc.htm",
    "cymbal",   "http://tools.eac.ea.com/util/cymbal.htm",
    "chunkify", "http://tools.eac.ea.com/util/chunkify.htm",
    "avi2chunk","http://tools.eac.ea.com/util/avi2chunk.htm",
    "dvdmap",   "http://tools.eac.ea.com/util/dvdmap.htm",
    "du",       "http://tools.eac.ea.com/util/du.htm",
    "db",       "http://tools.eac.ea.com/util/db.htm",
    "dis",      "http://tools.eac.ea.com/util/dis.htm",
    "e",        "http://tools.eac.ea.com/util/e.htm",
    "gsr",      "http://tools.eac.ea.com/util/gsr.htm",
    "grep",     "http://tools.eac.ea.com/util/grep.htm",
    "hashid",   "http://tools.eac.ea.com/util/hashid.htm",
    "huff",     "http://tools.eac.ea.com/util/huff.htm",
    "ie",       "http://tools.eac.ea.com/util/ie.htm",
    "imagetohex","http://tools.eac.ea.com/util/imagetohex.htm",
    "locomoto", "http://tools.eac.ea.com/util/locomoto.htm",
    "lumpy",    "http://tools.eac.ea.com/util/lumpy.htm",
    "lump",     "http://tools.eac.ea.com/util/lump.htm",
    "makepad",  "http://tools.eac.ea.com/util/makepad.htm",
    "eapu",     "http://tools.eac.ea.com/util/eapu.htm",
    "math",     "http://tools.eac.ea.com/util/math.htm",
    "mathx",    "http://tools.eac.ea.com/util/mathx.htm",
    "moviecat", "http://tools.eac.ea.com/util/moviecat.htm",
    "paddvd",   "http://tools.eac.ea.com/util/paddvd.htm",
    "sleep",    "http://tools.eac.ea.com/util/sleep.htm",
    "spit_eg",  "http://tools.eac.ea.com/util/spit_eg.htm",
    "sortshp",  "http://tools.eac.ea.com/util/sortshp.htm",
    "tabs",     "http://tools.eac.ea.com/util/tabs.htm",
    "timex",    "http://tools.eac.ea.com/util/timex.htm",
    "touch",    "http://tools.eac.ea.com/util/touch.htm",
    "txt",      "http://tools.eac.ea.com/util/txt.htm",
    "undup",    "http://tools.eac.ea.com/util/undup.htm",
    "uni",      "http://tools.eac.ea.com/util/uni.htm",
    "unslash",  "http://tools.eac.ea.com/util/unslash.htm",
    "url",      "http://tools.eac.ea.com/util/url.htm",
    "xd",       "http://tools.eac.ea.com/util/xd.htm",
    "xl",       "http://tools.eac.ea.com/util/xl.htm",
    "whereis",  "http://tools.eac.ea.com/util/whereis.htm",
    "venom",    "http://tools.eac.ea.com/util/venom.htm",
    "zcopy",    "http://tools.eac.ea.com/util/zcopy.htm",
    "zcut",     "http://tools.eac.ea.com/util/zcut.htm",
    "zarg",     "http://tools.eac.ea.com/util/zarg.htm",
    "zhelp",    "http://tools.eac.ea.com/util/zhelp.htm",
    "zfilesize","http://tools.eac.ea.com/util/zfilesize.htm",
    "zrename",  "http://tools.eac.ea.com/util/zrename.htm",
    "zrun",     "http://tools.eac.ea.com/util/zrun.htm",
    "ztee",     "http://tools.eac.ea.com/util/ztee.htm",
    "chump",    "http://tools.eac.ea.com/util/chump.htm",
    "tags",     "http://tools.eac.ea.com/util/tags.htm",
    "recurse",  "http://tools.eac.ea.com/util/recurse.htm",
    "farmer",   "http://tools.eac.ea.com/util/farmer.htm",
    "shpinfo",  "http://tools.eac.ea.com/util/shpinfo.htm",
    "fontinfo", "http://tools.eac.ea.com/util/fontinfo.htm",
    "vivview",  "http://tools.eac.ea.com/util/vivview.htm",

    "zdepends", "http://tools.eac.ea.com/util/zdepends.htm",
    "glump",    "http://tools.eac.ea.com/util/glump.htm",
    "lump",     "http://tools.eac.ea.com/util/lump.htm",
    "bighead",  "http://tools.eac.ea.com/util/bighead.htm",
    "bh",       "http://tools.eac.ea.com/util/bh.htm",
    "big2",     "http://tools.eac.ea.com/util/big2.htm",
    "luxpak",   "http://tools.eac.ea.com/util/luxpak.htm",
    "filestat", "http://tools.eac.ea.com/util/filestat.htm",

    // Gimex modules

    "ACT",      "http://tools.eac.ea.com/gimex/release/functions/ACT.htm",
    "ANM",      "http://tools.eac.ea.com/gimex/release/functions/ANM.htm",
    "AVI",      "http://tools.eac.ea.com/gimex/release/functions/AVI.htm",
    "BIF",      "http://tools.eac.ea.com/gimex/release/functions/BIF.htm",
    "BMP",      "http://tools.eac.ea.com/gimex/release/functions/BMP.htm",
    "BNR",      "http://tools.eac.ea.com/gimex/release/functions/BNR.htm",
    "CLP",      "http://tools.eac.ea.com/gimex/release/functions/CLP.htm",
    "DDS",      "http://tools.eac.ea.com/gimex/release/functions/DDS.htm",
    "EPS",      "http://tools.eac.ea.com/gimex/release/functions/EPS.htm",
    "EXE",      "http://tools.eac.ea.com/gimex/release/functions/EXE.htm",
    "FLI",      "http://tools.eac.ea.com/gimex/release/functions/FLI.htm",
    "FLM",      "http://tools.eac.ea.com/gimex/release/functions/FLM.htm",
    "FNT",      "http://tools.eac.ea.com/gimex/release/functions/FNT.htm",
    "GIF",      "http://tools.eac.ea.com/gimex/release/functions/GIF.htm",
    "GMX",      "http://tools.eac.ea.com/gimex/release/functions/GMX.htm",
    "HSI",      "http://tools.eac.ea.com/gimex/release/functions/HSI.htm",
    "ICO",      "http://tools.eac.ea.com/gimex/release/functions/ICO.htm",
    "IJL",      "http://tools.eac.ea.com/gimex/release/functions/IJL.htm",
    "ILBM",     "http://tools.eac.ea.com/gimex/release/functions/ILBM.htm",
    "JP2",      "http://tools.eac.ea.com/gimex/release/functions/JP2.htm",
    "JPeg",     "http://tools.eac.ea.com/gimex/release/functions/JPeg.htm",
    "MOV",      "http://tools.eac.ea.com/gimex/release/functions/MOV.htm",
    "MPC",      "http://tools.eac.ea.com/gimex/release/functions/MPEG.htm",
    "MPEG",     "http://tools.eac.ea.com/gimex/release/functions/MPEG.htm",
    "Mad",      "http://tools.eac.ea.com/gimex/release/functions/Madcow.htm",
    "Madcow",   "http://tools.eac.ea.com/gimex/release/functions/Madcow.htm",
    "NEW",      "http://tools.eac.ea.com/gimex/release/functions/NEW.htm",
    "Nil",      "http://tools.eac.ea.com/gimex/release/functions/Nil.htm",
    "PCX",      "http://tools.eac.ea.com/gimex/release/functions/PCX.htm",
    "PIC",      "http://tools.eac.ea.com/gimex/release/functions/PIC.htm",
    "PIX",      "http://tools.eac.ea.com/gimex/release/functions/PIX.htm",
    "PPM",      "http://tools.eac.ea.com/gimex/release/functions/PPM.htm",
    "PSD",      "http://tools.eac.ea.com/gimex/release/functions/PSD.htm",
    "Png",      "http://tools.eac.ea.com/gimex/release/functions/Png.htm",
    "QT3",      "http://tools.eac.ea.com/gimex/release/functions/QT3.htm",
    "Qmt",      "http://tools.eac.ea.com/gimex/release/functions/Qmt.htm",
    "RAM",      "http://tools.eac.ea.com/gimex/release/functions/RAM.htm",
    "RAW",      "http://tools.eac.ea.com/gimex/release/functions/RAW.htm",
    "RLA",      "http://tools.eac.ea.com/gimex/release/functions/RLA.htm",
    "SCT",      "http://tools.eac.ea.com/gimex/release/functions/SCT.htm",
    "SGI",      "http://tools.eac.ea.com/gimex/release/functions/SGI.htm",
    "SHP",      "http://tools.eac.ea.com/gimex/release/functions/SHP.htm",
    "SIM",      "http://tools.eac.ea.com/gimex/release/functions/SIM.htm",
    "STR",      "http://tools.eac.ea.com/gimex/release/functions/STR.htm",
    "TGA",      "http://tools.eac.ea.com/gimex/release/functions/TGA.htm",
    "TGV",      "http://tools.eac.ea.com/gimex/release/functions/TGV.htm",
    "TIF",      "http://tools.eac.ea.com/gimex/release/functions/TIF.htm",
    "TIM",      "http://tools.eac.ea.com/gimex/release/functions/TIM.htm",
    "TPL",      "http://tools.eac.ea.com/gimex/release/functions/TPL.htm",
    "TTF",      "http://tools.eac.ea.com/gimex/release/functions/TTF.htm",

    // gimex libraries
    "codex",    "http://tools.eac.ea.com/gimex/release/functions/codexindex.htm",
    "crapi",    "http://tools.eac.ea.com/gimex/release/functions/crapiindex.htm",
    "gfilter",  "http://tools.eac.ea.com/gimex/release/functions/gfilterindex.htm",
    "stdgimex", "http://tools.eac.ea.com/gimex/release/functions/stdgimexindex.htm",

    "perlgimex", "C:\\Perl\\html\\site\\lib\\Gimex\\Gimex.html",

    // People
    "gerry",    "http://tools.eac.ea.com/gerry",
    "frank",    "http://tools.eac.ea.com/egami/frank",
    "ian",      "http://tools.eac.ea.com/egami/ian",
    "bernard",  "http://tools.eac.ea.com/egami/bernard",
    "mike",     "http://tools.eac.ea.com/egami/mike",


    // Other topics

    "Freetype", "http://freetype.sourceforge.net/freetype2/documentation.html",
    "acdsee",   "http://tools.eac.ea.com/gimex/release/tools/acdsee/index.htm",
    "tar",      "http://www.gnu.org/manual/tar/index.html",
    "vi",       "http://www.bris.ac.uk/is/selfhelp/documentation/vi-r2/vi-r2.htm#toc0600",
    "madcow",   "http://tools.eac.ea.com/madcow",
    "mdec",     "http://tools.eac.ea.com/mdec/mdec.htm",
    "zlib",     "http://www.pkware.com/support/appnote.html",
    "zip",      "http://www.organicbit.com/zip",
    "gzip",     "ftp://swrinde.nde.swri.edu/pub/png/documents/zlib/rfc-gzip.html#file-format",
    "siggraph", "http://www.dps.eac.ea.com/adg/SIGGRAPH/post_siggraph_main.html",
    "depot",    "http://garp.eac.ad.ea.com/cgi-bin/perfbrowse.pl",
    "color",    "http://www.lissaexplains.com/color.shtml",
    "make",     "http://www.gnu.org/manual/make/html_mono/make.html",
    "glossary", "http://is.worldwide.ea.com/PMFG/References/glossary_all.htm",
    "winzip",   "http://www.winzip.com/xcmdline.htm",
    "winzip32", "http://www.winzip.com/xcmdline.htm",
//    "gcc",      "http://gcc.gnu.org/onlinedocs/",
    "gcc",      "http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Optimize-Options.html#Optimize-Options",
    "virtualdub", "http://www.virtualdub.org",
    "vdub",     "http://www.virtualdub.org",
    "dxt",      "http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/programmingguide/FixedFunction/Textures/compressed/alphatextures.asp",
    "moby",     "http://www.mobygames.com",

    // Packages
    "packages", "http://packages.worldwide.ea.com/",
    "gdf",      "http://framework.eac.ea.com",
    "framework","http://framework.eac.ea.com",
    "wiki",     "http://framework.eac.ad.ea.com/wiki",
    "apt",      "http://framework.worldwide.ea.com/release.aspx?id=645",
    "post",     "http://packages.worldwide.ea.com/admin/upload.aspx",
    "perlgimex","http://www.eac.ea.com/funatic/projects/gmx/",
    "ActivePerl","http://packages.worldwide.ea.com/package.aspx?id=18",
    "ActivePython","http://packages.worldwide.ea.com/package.aspx?id=22",
    "XDK","http://packages.worldwide.ea.com/package.aspx?id=6",
    "xbox","http://packages.worldwide.ea.com/package.aspx?id=6",
    "vp6","http://packages.worldwide.ea.com/package.aspx?id=404",
    "xenonsdk","http://packages.worldwide.ea.com/package.aspx?id=408",
    "xenon","http://packages.worldwide.ea.com/package.aspx?id=408",
    "xbox2","http://packages.worldwide.ea.com/package.aspx?id=408",
    "tlmovie","http://packages.worldwide.ea.com/package.aspx?id=506",
    "playstation2sn","http://packages.worldwide.ea.com/package.aspx?id=8",
    "ps2","http://packages.worldwide.ea.com/package.aspx?id=8",
    "playstation2","http://packages.worldwide.ea.com/package.aspx?id=8",
    "GameCubeSN", "http://packages.worldwide.ea.com/package.aspx?id=9",
    "GameCubeDolphinSDK", "http://packages.worldwide.ea.com/package.aspx?id=93",

    // EA World resources
    "ppt",      "http://eahq-web.ea.com/hr/second.asp?group_id=2&page_id=69",
    "services", "http://services.worldwide.ea.com/",
    "eaworld",  "http://www.worldwide.ea.com/",
    "loadtimes","http://www.worldwide.ea.com/PlatformLoadTimes/index.aspx",
    "courses",  "http://hrtools.ea.com/EAU/Registration/",
    "glossary", "http://www.eac.ea.com/funatic/Glossary/",
    "ignition", "http://ignition.ea.com",
    "csl",      "http://ignition.eac.ad.ea.com/default.aspx",
    "irc",      "http://www.eac.ea.com/IRC",

    // Microsoft documentation
    "msdn",     "http://msdn.microsoft.com/",
    "cl",       "http://msdn.microsoft.com/visualc/",
    "link",     "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_linker_reference.asp",

    0,0,
};

char *findurlshortcut(const char *cut)
{
    int i;
    const char *url=0;

    for (i=0; pages[i].cut; ++i)
    {
        if (strlen(pages[i].cut) == strlen(cut))
        {
            if (!strnicmp(cut,pages[i].cut,strlen(pages[i].cut)))
            {
                url = pages[i].url;
            }
        }
    }
    return((char *)url);
}

int findurlshortcutlen(const char *cut)
{
    return(strlen(findurlshortcut(cut)));
}


/*
;
; ABSTRACT
;
; zhelp - fetches web help on a topic
;
; SUMMARY
;
; zhelp -lib function
;     @file     response file, containing a list of options and files
;     -nologo   disable banner
;     -v0       no console output
;     -v1       prints source file name and errors
;     -v2       status line for each file (default)
;     -v3       additional info
;     -url<s>   url for where help topics come from
;     -<lib>    short cut names for all libs etc
;
;     sdk/platforms
;
;     -real     http://tools.eac.ea.com/real/
;     -eagl     http://tools.eac.ea.com/eagl/
;     -audio    http://tools.eac.ea.com/audio/
;     -gx       http://tools.eac.ea.com/gx/
;     -mpc      http://tools.eac.ea.com/mpegkit/
;     -fontwiz  http://tools.eac.ea.com/fontwiz/
;     -p2       http://tools.eac.ea.com/p2/
;     -passwordshttp://tools.eac.ea.com/passwords/
;     -devreal  http://tools.eac.ea.com/real/pc/functions/devreal.htm
;     -pc       http://tools.eac.ea.com/real/pc/functions/
;     -win      http://tools.eac.ea.com/real/pc/functions/
;     -win95    http://tools.eac.ea.com/real/pc/functions/
;     -ps2      http://tools.eac.ea.com/real/ps2/functions/
;     -sony     http://tools.eac.ea.com/real/ps2/functions/
;     -gc       http://tools.eac.ea.com/real/gc/functions/
;     -xbox     http://tools.eac.ea.com/real/xbox/functions/
;     -unix     http://tools.eac.ea.com/real/unix/functions/
;     -gimex    http://tools.eac.ea.com/gimex/release/functions/
;     -tools    http://tools.eac.ea.com/
;
;     real
;     -pcu       http://tools.eac.ea.com/realunofficial/pc/functions/
;     -ps2u      http://tools.eac.ea.com/realunofficial/ps2/functions/
;     -gcu       http://tools.eac.ea.com/realunofficial/gc/functions/
;     -xboxu     http://tools.eac.ea.com/realunofficial/xbox/functions/
;     -unixu     http://tools.eac.ea.com/realunofficial/unix/functions/
;     -gimexu    http://tools.eac.ea.com/realunofficial/gimex/release/
;     -toolsu    http://tools.eac.ea.com/realunofficial/
;     -gxu       http://tools.eac.ea.com/realunofficial/gx/
;
;     real headers
;     -realbase  http://tools.eac.ea.com/real/pc/functions/realbaseh.htm
;     -realcodec http://tools.eac.ea.com/real/pc/functions/realcodech.htm
;     -realdebug http://tools.eac.ea.com/real/pc/functions/realdebugh.htm
;     -realfile  http://tools.eac.ea.com/real/pc/functions/realfileh.htm
;     -realfont  http://tools.eac.ea.com/real/pc/functions/realfonth.htm
;     -realgraph http://tools.eac.ea.com/real/pc/functions/realgraphh.htm
;     -realinput http://tools.eac.ea.com/real/pc/functions/realinputh.htm
;     -realmath  http://tools.eac.ea.com/real/pc/functions/realmathh.htm
;     -realmathplushttp://tools.eac.ea.com/real/pc/functions/realmathplush.htm
;     -realmem   http://tools.eac.ea.com/real/pc/functions/realmemh.htm
;     -realshape http://tools.eac.ea.com/real/pc/functions/realshapeh.htm
;     -realsystemhttp://tools.eac.ea.com/real/pc/functions/realsystemh.htm
;
;     -base  http://tools.eac.ea.com/real/pc/functions/realbaseh.htm
;     -codec http://tools.eac.ea.com/real/pc/functions/realcodech.htm
;     -debug http://tools.eac.ea.com/real/pc/functions/realdebugh.htm
;     -file  http://tools.eac.ea.com/real/pc/functions/realfileh.htm
;     -font  http://tools.eac.ea.com/real/pc/functions/realfonth.htm
;     -graph http://tools.eac.ea.com/real/pc/functions/realgraphh.htm
;     -input http://tools.eac.ea.com/real/pc/functions/realinputh.htm
;     -math  http://tools.eac.ea.com/real/pc/functions/realmathh.htm
;     -mathplushttp://tools.eac.ea.com/real/pc/functions/realmathplush.htm
;     -mem   http://tools.eac.ea.com/real/pc/functions/realmemh.htm
;     -shape http://tools.eac.ea.com/real/pc/functions/realshapeh.htm
;     -systemhttp://tools.eac.ea.com/real/pc/functions/realsystemh.htm
;     -realcomm  http://tools.eac.ea.com/comm
;     -comm      http://tools.eac.ea.com/comm
;     -rcmp      http://tools.eac.ea.com/moviekit
;     -moviekit  http://tools.eac.ea.com/moviekit
;
;     real headers unofficial
;     -realbaseu  http://tools.eac.ea.com/realunofficial/pc/functions/realbaseh.htm
;     -realcodecu http://tools.eac.ea.com/realunofficial/pc/functions/realcodech.htm
;     -realdebugu http://tools.eac.ea.com/realunofficial/pc/functions/realdebugh.htm
;     -realfileu  http://tools.eac.ea.com/realunofficial/pc/functions/realfileh.htm
;     -realfontu  http://tools.eac.ea.com/realunofficial/pc/functions/realfonth.htm
;     -realgraphu http://tools.eac.ea.com/realunofficial/pc/functions/realgraphh.htm
;     -realinputu http://tools.eac.ea.com/realunofficial/pc/functions/realinputh.htm
;     -realmathu  http://tools.eac.ea.com/realunofficial/pc/functions/realmathh.htm
;     -realmathplusuhttp://tools.eac.ea.com/realunofficial/pc/functions/realmathplush.htm
;     -realmemu   http://tools.eac.ea.com/realunofficial/pc/functions/realmemh.htm
;     -realshapeu http://tools.eac.ea.com/realunofficial/pc/functions/realshapeh.htm
;     -realsystemuhttp://tools.eac.ea.com/realunofficial/pc/functions/realsystemh.htm
;
;
;     shapes
;
;     -fsh      http://tools.eac.ea.com/gimex/release/formats/fsh.htm
;     -ssh      http://tools.eac.ea.com/gimex/release/formats/ssh.htm
;     -xsh      http://tools.eac.ea.com/gimex/release/formats/xsh.htm
;     -gsh      http://tools.eac.ea.com/gimex/release/formats/gsh.htm
;     -msh      http://tools.eac.ea.com/gimex/release/formats/msh.htm
;     -ash      http://tools.eac.ea.com/gimex/release/formats/ash.htm
;     -psh      http://tools.eac.ea.com/gimex/release/formats/psh.htm
;     -nsh      http://tools.eac.ea.com/gimex/release/formats/nsh.htm
;
;     shapes
;
;     -fss      http://tools.eac.ea.com/gimex/release/formats/fsh.htm
;     -sss      http://tools.eac.ea.com/gimex/release/formats/ssh.htm
;     -xss      http://tools.eac.ea.com/gimex/release/formats/xsh.htm
;     -gss      http://tools.eac.ea.com/gimex/release/formats/gsh.htm
;     -mss      http://tools.eac.ea.com/gimex/release/formats/msh.htm
;     -ass      http://tools.eac.ea.com/gimex/release/formats/ash.htm
;     -pss      http://tools.eac.ea.com/gimex/release/formats/psh.htm
;     -nss      http://tools.eac.ea.com/gimex/release/formats/nsh.htm
;
;     font
;
;     -font     http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -ffn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -sfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -xfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -gfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -mfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -afn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -pfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;     -nfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm
;
;     bigfile
;     -viv      http://tools.eac.ea.com/gimex/release/formats/viv.htm
;
;     ftp browser
;
;     -enviro           http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/
;     -enviro/util/pc      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/util/pc/
;     -util             http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/util/pc/
;     -enviro/xbox      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/
;     -xdk              http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/secure/
;     -enviro/gc        http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/gc/
;     -enviro/ps2       http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/
;     -enviro/3rdparty/ps2/sn    http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/
;     -enviro/3dtools/ea3       http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/
;     -ea3              http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/
;     -enviro/eagl/eagl      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/eagl/eagl/
;     -sn               http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/
;
;     tools/utils
;
;     -devfontwizhttp://tools.eac.ea.com/util/devfontwiz.htm
;     -devtools http://tools.eac.ea.com/util/devtools.htm
;     -devgimex http://tools.eac.ea.com/gimex/release/functions/devlib.htm
;     -gx       http://tools.eac.ea.com/util/gx.htm
;     -gcmp     http://tools.eac.ea.com/util/gcmp.htm
;     -ginfo    http://tools.eac.ea.com/util/ginfo.htm
;     -gshow    http://tools.eac.ea.com/util/gshow.htm
;     -gclip    http://tools.eac.ea.com/util/gclip.htm
;     -gis      http://tools.eac.ea.com/util/gis.htm
;     -cramany  http://tools.eac.ea.com/util/cramany.htm
;     -acdc     http://tools.eac.ea.com/util/acdc.htm
;     -abstract http://tools.eac.ea.com/util/abstract.htm
;     -author   http://tools.eac.ea.com/util/author.htm
;     -bingrep  http://tools.eac.ea.com/util/bingrep.htm
;     -bmw      http://tools.eac.ea.com/util/bmw.htm
;     -chimp    http://tools.eac.ea.com/util/chimp.htm
;     -cmp      http://tools.eac.ea.com/util/cmp.htm
;     -copyr    http://tools.eac.ea.com/util/copyr.htm
;     -crc      http://tools.eac.ea.com/util/crc.htm
;     -cymbal   http://tools.eac.ea.com/util/cymbal.htm
;     -chunkify http://tools.eac.ea.com/util/chunkify.htm
;     -db       http://tools.eac.ea.com/util/db.htm
;     -dis      http://tools.eac.ea.com/util/dis.htm
;     -e        http://tools.eac.ea.com/util/e.htm
;     -gsr      http://tools.eac.ea.com/util/gsr.htm
;     -grep     http://tools.eac.ea.com/util/grep.htm
;     -hashid   http://tools.eac.ea.com/util/hashid.htm
;     -huff     http://tools.eac.ea.com/util/huff.htm
;     -ie       http://tools.eac.ea.com/util/ie.htm
;     -locomoto http://tools.eac.ea.com/util/locomoto.htm
;     -lumpy    http://tools.eac.ea.com/util/lumpy.htm
;     -lump     http://tools.eac.ea.com/util/lump.htm
;     -math     http://tools.eac.ea.com/util/math.htm
;     -mathx    http://tools.eac.ea.com/util/mathx.htm
;     -eapu     http://tools.eac.ea.com/util/eapu.htm
;     -sleep    http://tools.eac.ea.com/util/sleep.htm
;     -spit_eg  http://tools.eac.ea.com/util/spit_eg.htm
;     -sortshp  http://tools.eac.ea.com/util/sortshp.htm
;     -tabs     http://tools.eac.ea.com/util/tabs.htm
;     -timex    http://tools.eac.ea.com/util/timex.htm
;     -txt      http://tools.eac.ea.com/util/txt.htm
;     -undup    http://tools.eac.ea.com/util/undup.htm
;     -unslash  http://tools.eac.ea.com/util/unslash.htm
;     -url      http://tools.eac.ea.com/util/url.htm
;     -xd       http://tools.eac.ea.com/util/xd.htm
;     -xl       http://tools.eac.ea.com/util/xl.htm
;     -whereis  http://tools.eac.ea.com/util/whereis.htm
;     -venom    http://tools.eac.ea.com/util/venom.htm
;     -zcopy    http://tools.eac.ea.com/util/zcopy.htm
;     -zcut     http://tools.eac.ea.com/util/zcut.htm
;     -zhelp    http://tools.eac.ea.com/util/zhelp.htm
;     -zrename  http://tools.eac.ea.com/util/zrename.htm
;     -zrun     http://tools.eac.ea.com/util/zrun.htm
;     -chump    http://tools.eac.ea.com/util/chump.htm
;     -tags     http://tools.eac.ea.com/util/tags.htm
;     -recurse  http://tools.eac.ea.com/util/recurse.htm
;     -farmer   http://tools.eac.ea.com/util/farmer.htm
;     -shpinfo  http://tools.eac.ea.com/util/shpinfo.htm
;     -fontinfo http://tools.eac.ea.com/util/fontinfo.htm
;
;     Gimex modules
;
;     -ACT      http://tools.eac.ea.com/gimex/release/functions/ACT.htm
;     -ANM      http://tools.eac.ea.com/gimex/release/functions/ANM.htm
;     -AVI      http://tools.eac.ea.com/gimex/release/functions/AVI.htm
;     -BIF      http://tools.eac.ea.com/gimex/release/functions/BIF.htm
;     -BMP      http://tools.eac.ea.com/gimex/release/functions/BMP.htm
;     -BNR      http://tools.eac.ea.com/gimex/release/functions/BNR.htm
;     -CLP      http://tools.eac.ea.com/gimex/release/functions/CLP.htm
;     -DDS      http://tools.eac.ea.com/gimex/release/functions/DDS.htm
;     -EPS      http://tools.eac.ea.com/gimex/release/functions/EPS.htm
;     -EXE      http://tools.eac.ea.com/gimex/release/functions/EXE.htm
;     -FLI      http://tools.eac.ea.com/gimex/release/functions/FLI.htm
;     -FLM      http://tools.eac.ea.com/gimex/release/functions/FLM.htm
;     -FNT      http://tools.eac.ea.com/gimex/release/functions/FNT.htm
;     -GIF      http://tools.eac.ea.com/gimex/release/functions/GIF.htm
;     -GMX      http://tools.eac.ea.com/gimex/release/functions/GMX.htm
;     -HSI      http://tools.eac.ea.com/gimex/release/functions/HSI.htm
;     -ICO      http://tools.eac.ea.com/gimex/release/functions/ICO.htm
;     -IJL      http://tools.eac.ea.com/gimex/release/functions/IJL.htm
;     -ILBM     http://tools.eac.ea.com/gimex/release/functions/ILBM.htm
;     -JP2      http://tools.eac.ea.com/gimex/release/functions/JP2.htm
;     -JPeg     http://tools.eac.ea.com/gimex/release/functions/JPeg.htm
;     -MOV      http://tools.eac.ea.com/gimex/release/functions/MOV.htm
;     -MPC      http://tools.eac.ea.com/gimex/release/functions/MPEG.htm
;     -MPEG     http://tools.eac.ea.com/gimex/release/functions/MPEG.htm
;     -Mad      http://tools.eac.ea.com/gimex/release/functions/Madcow.htm
;     -Madcow   http://tools.eac.ea.com/gimex/release/functions/Madcow.htm
;     -NEW      http://tools.eac.ea.com/gimex/release/functions/NEW.htm
;     -Nil      http://tools.eac.ea.com/gimex/release/functions/Nil.htm
;     -PCX      http://tools.eac.ea.com/gimex/release/functions/PCX.htm
;     -PIC      http://tools.eac.ea.com/gimex/release/functions/PIC.htm
;     -PIX      http://tools.eac.ea.com/gimex/release/functions/PIX.htm
;     -PPM      http://tools.eac.ea.com/gimex/release/functions/PPM.htm
;     -PSD      http://tools.eac.ea.com/gimex/release/functions/PSD.htm
;     -Png      http://tools.eac.ea.com/gimex/release/functions/Png.htm
;     -QT3      http://tools.eac.ea.com/gimex/release/functions/QT3.htm
;     -Qmt      http://tools.eac.ea.com/gimex/release/functions/Qmt.htm
;     -RAM      http://tools.eac.ea.com/gimex/release/functions/RAM.htm
;     -RAW      http://tools.eac.ea.com/gimex/release/functions/RAW.htm
;     -RLA      http://tools.eac.ea.com/gimex/release/functions/RLA.htm
;     -SCT      http://tools.eac.ea.com/gimex/release/functions/SCT.htm
;     -SGI      http://tools.eac.ea.com/gimex/release/functions/SGI.htm
;     -SHP      http://tools.eac.ea.com/gimex/release/functions/SHP.htm
;     -SIM      http://tools.eac.ea.com/gimex/release/functions/SIM.htm
;     -STR      http://tools.eac.ea.com/gimex/release/functions/STR.htm
;     -TGA      http://tools.eac.ea.com/gimex/release/functions/TGA.htm
;     -TGV      http://tools.eac.ea.com/gimex/release/functions/TGV.htm
;     -TIF      http://tools.eac.ea.com/gimex/release/functions/TIF.htm
;     -TIM      http://tools.eac.ea.com/gimex/release/functions/TIM.htm
;     -TPL      http://tools.eac.ea.com/gimex/release/functions/TPL.htm
;     -TTF      http://tools.eac.ea.com/gimex/release/functions/TTF.htm
;
;     gimex libraries
;     -codex    http://tools.eac.ea.com/gimex/release/functions/codexindex.htm
;     -crapi    http://tools.eac.ea.com/gimex/release/functions/crapiindex.htm
;     -gfilter  http://tools.eac.ea.com/gimex/release/functions/gfilterindex.htm
;     -stdgimex http://tools.eac.ea.com/gimex/release/functions/stdgimexindex.htm
;
;     Other topics
;
;     -Freetype http://freetype.sourceforge.net/freetype2/documentation.html
;     -acdsee   http://tools.eac.ea.com/gimex/release/tools/acdsee/index.htm
;     -tar      http://www.gnu.org/manual/tar/index.html
;     -vi       http://www.bris.ac.uk/is/selfhelp/documentation/vi-r2/vi-r2.htm#toc0600
;     -madcow   http://tools.eac.ea.com/madcow
;     -zlib     http://www.pkware.com/support/appnote.html
;     -zip      http://www.organicbit.com/zip
;     -wiki     http://framework.eac.ad.ea.com/wiki
; DESCRIPTION
;
; This utility fetches a web page on the topic specified.
; The full URL will be based on a default url, with the topic
; appended and a .htm.  The default url can be changed as an
; environment variable.  zhelp will search for either internet
; explorer or netscape and launch it on the page.  The default
; url is http://tools.eac.ea.com/real/lib/win/
;
; RETURNS
;
; no return code
;
; SEE ALSO
;
; Spit
;
; SAMPLE OUTPUT
;
; >zhelp loadfile
;
;   ZHELP v1.03 (Queen Elizabeth) (c) 1996 FrANK Barchard
;   spit.h: Reading, ZHELP: -20926 ($ae42)
;   spit.h: Reading, ZHELP: 11106 ($2b62)
;
; END ABSTRACT
;
*/

/****************************************************************/
/*  SPIT Routines                                               */
/****************************************************************/

char *optionhelp[]=
{
    "    @file     response file, containing a list of options and files\n",
    "    -nologo   disable banner\n",
    "    -v0       no console output\n",
    "    -v1       prints source file name and errors\n",
    "    -v2       status line for each file (default)\n",
    "    -v3       additional info\n",
    "    -url<s>   url for where help topics come from\n",
    "    -<lib>    short cut names for all libs etc\n",
    "\n",
    "    sdk/platforms\n",
    "\n",
    "    -real     http://tools.eac.ea.com/real/\n",
    "    -eagl     http://tools.eac.ea.com/eagl/\n",
    "    -audio    http://tools.eac.ea.com/audio/\n",
    "    -gx       http://tools.eac.ea.com/gx/\n",
    "    -mpc      http://tools.eac.ea.com/mpegkit/\n",
    "    -fontwiz  http://tools.eac.ea.com/fontwiz/\n",
    "    -p2       http://tools.eac.ea.com/p2/\n",
    "    -passwordshttp://tools.eac.ea.com/passwords/\n",
    "    -devreal  http://tools.eac.ea.com/real/pc/functions/devreal.htm\n",
    "    -pc       http://tools.eac.ea.com/real/pc/functions/\n",
    "    -win      http://tools.eac.ea.com/real/pc/functions/\n",
    "    -win95    http://tools.eac.ea.com/real/pc/functions/\n",
    "    -ps2      http://tools.eac.ea.com/real/ps2/functions/\n",
    "    -sony     http://tools.eac.ea.com/real/ps2/functions/\n",
    "    -gc       http://tools.eac.ea.com/real/gc/functions/\n",
    "    -xbox     http://tools.eac.ea.com/real/xbox/functions/\n",
    "    -unix     http://tools.eac.ea.com/real/unix/functions/\n",
    "    -gimex    http://tools.eac.ea.com/gimex/release/functions/\n",
    "    -tools    http://tools.eac.ea.com/\n",
    "\n",
    "    real\n",
    "    -pcu       http://tools.eac.ea.com/realunofficial/pc/functions/\n",
    "    -ps2u      http://tools.eac.ea.com/realunofficial/ps2/functions/\n",
    "    -gcu       http://tools.eac.ea.com/realunofficial/gc/functions/\n",
    "    -xboxu     http://tools.eac.ea.com/realunofficial/xbox/functions/\n",
    "    -unixu     http://tools.eac.ea.com/realunofficial/unix/functions/\n",
    "    -gimexu    http://tools.eac.ea.com/realunofficial/gimex/release/\n",
    "    -toolsu    http://tools.eac.ea.com/realunofficial/\n",
    "    -gxu       http://tools.eac.ea.com/realunofficial/gx/\n",
    "\n",
    "    real headers\n",
    "    -realbase  http://tools.eac.ea.com/real/pc/functions/realbaseh.htm\n",
    "    -realcodec http://tools.eac.ea.com/real/pc/functions/realcodech.htm\n",
    "    -realdebug http://tools.eac.ea.com/real/pc/functions/realdebugh.htm\n",
    "    -realfile  http://tools.eac.ea.com/real/pc/functions/realfileh.htm\n",
    "    -realfont  http://tools.eac.ea.com/real/pc/functions/realfonth.htm\n",
    "    -realgraph http://tools.eac.ea.com/real/pc/functions/realgraphh.htm\n",
    "    -realinput http://tools.eac.ea.com/real/pc/functions/realinputh.htm\n",
    "    -realmath  http://tools.eac.ea.com/real/pc/functions/realmathh.htm\n",
    "    -realmathplushttp://tools.eac.ea.com/real/pc/functions/realmathplush.htm\n",
    "    -realmem   http://tools.eac.ea.com/real/pc/functions/realmemh.htm\n",
    "    -realshape http://tools.eac.ea.com/real/pc/functions/realshapeh.htm\n",
    "    -realsystemhttp://tools.eac.ea.com/real/pc/functions/realsystemh.htm\n",
    "\n",
    "    -base  http://tools.eac.ea.com/real/pc/functions/realbaseh.htm\n",
    "    -codec http://tools.eac.ea.com/real/pc/functions/realcodech.htm\n",
    "    -debug http://tools.eac.ea.com/real/pc/functions/realdebugh.htm\n",
    "    -file  http://tools.eac.ea.com/real/pc/functions/realfileh.htm\n",
    "    -font  http://tools.eac.ea.com/real/pc/functions/realfonth.htm\n",
    "    -graph http://tools.eac.ea.com/real/pc/functions/realgraphh.htm\n",
    "    -input http://tools.eac.ea.com/real/pc/functions/realinputh.htm\n",
    "    -math  http://tools.eac.ea.com/real/pc/functions/realmathh.htm\n",
    "    -mathplushttp://tools.eac.ea.com/real/pc/functions/realmathplush.htm\n",
    "    -mem   http://tools.eac.ea.com/real/pc/functions/realmemh.htm\n",
    "    -shape http://tools.eac.ea.com/real/pc/functions/realshapeh.htm\n",
    "    -systemhttp://tools.eac.ea.com/real/pc/functions/realsystemh.htm\n",
    "    -realcomm  http://tools.eac.ea.com/comm\n",
    "    -comm      http://tools.eac.ea.com/comm\n",
    "    -rcmp      http://tools.eac.ea.com/moviekit\n",
    "    -moviekit  http://tools.eac.ea.com/moviekit\n",
    "\n",
    "    real headers unofficial\n",
    "    -realbaseu  http://tools.eac.ea.com/realunofficial/pc/functions/realbaseh.htm\n",
    "    -realcodecu http://tools.eac.ea.com/realunofficial/pc/functions/realcodech.htm\n",
    "    -realdebugu http://tools.eac.ea.com/realunofficial/pc/functions/realdebugh.htm\n",
    "    -realfileu  http://tools.eac.ea.com/realunofficial/pc/functions/realfileh.htm\n",
    "    -realfontu  http://tools.eac.ea.com/realunofficial/pc/functions/realfonth.htm\n",
    "    -realgraphu http://tools.eac.ea.com/realunofficial/pc/functions/realgraphh.htm\n",
    "    -realinputu http://tools.eac.ea.com/realunofficial/pc/functions/realinputh.htm\n",
    "    -realmathu  http://tools.eac.ea.com/realunofficial/pc/functions/realmathh.htm\n",
    "    -realmathplusuhttp://tools.eac.ea.com/realunofficial/pc/functions/realmathplush.htm\n",
    "    -realmemu   http://tools.eac.ea.com/realunofficial/pc/functions/realmemh.htm\n",
    "    -realshapeu http://tools.eac.ea.com/realunofficial/pc/functions/realshapeh.htm\n",
    "    -realsystemuhttp://tools.eac.ea.com/realunofficial/pc/functions/realsystemh.htm\n",
    "\n",
    "\n",
    "    shapes\n",
    "\n",
    "    -fsh      http://tools.eac.ea.com/gimex/release/formats/fsh.htm\n",
    "    -ssh      http://tools.eac.ea.com/gimex/release/formats/ssh.htm\n",
    "    -xsh      http://tools.eac.ea.com/gimex/release/formats/xsh.htm\n",
    "    -gsh      http://tools.eac.ea.com/gimex/release/formats/gsh.htm\n",
    "    -msh      http://tools.eac.ea.com/gimex/release/formats/msh.htm\n",
    "    -ash      http://tools.eac.ea.com/gimex/release/formats/ash.htm\n",
    "    -psh      http://tools.eac.ea.com/gimex/release/formats/psh.htm\n",
    "    -nsh      http://tools.eac.ea.com/gimex/release/formats/nsh.htm\n",
    "\n",
    "    shapes\n",
    "\n",
    "    -fss      http://tools.eac.ea.com/gimex/release/formats/fsh.htm\n",
    "    -sss      http://tools.eac.ea.com/gimex/release/formats/ssh.htm\n",
    "    -xss      http://tools.eac.ea.com/gimex/release/formats/xsh.htm\n",
    "    -gss      http://tools.eac.ea.com/gimex/release/formats/gsh.htm\n",
    "    -mss      http://tools.eac.ea.com/gimex/release/formats/msh.htm\n",
    "    -ass      http://tools.eac.ea.com/gimex/release/formats/ash.htm\n",
    "    -pss      http://tools.eac.ea.com/gimex/release/formats/psh.htm\n",
    "    -nss      http://tools.eac.ea.com/gimex/release/formats/nsh.htm\n",
    "\n",
    "    font\n",
    "\n",
    "    -font     http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -ffn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -sfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -xfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -gfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -mfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -afn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -pfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "    -nfn      http://tools.eac.ea.com/gimex/release/formats/font/fontfile.htm\n",
    "\n",
    "    bigfile\n",
    "    -viv      http://tools.eac.ea.com/gimex/release/formats/viv.htm\n",
    "\n",
    "    ftp browser\n",
    "\n",
    "    -enviro           http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/\n",
    "    -enviro/util/pc      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/util/pc/\n",
    "    -util             http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/util/pc/\n",
    "    -enviro/xbox      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/\n",
    "    -xdk              http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/xbox/secure/\n",
    "    -enviro/gc        http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/gc/\n",
    "    -enviro/ps2       http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/\n",
    "    -enviro/3rdparty/ps2/sn    http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/\n",
    "    -enviro/3dtools/ea3       http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/\n",
    "    -ea3              http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3dtools/ea3/\n",
    "    -enviro/eagl/eagl      http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/eagl/eagl/\n",
    "    -sn               http://tools.eac.ea.com/enviro/download.asp?dir=/enviro/3rdparty/ps2/sn/\n",
    "\n",
    "    tools/utils\n",
    "\n",
    "    -devfontwizhttp://tools.eac.ea.com/util/devfontwiz.htm\n",
    "    -devtools http://tools.eac.ea.com/util/devtools.htm\n",
    "    -devgimex http://tools.eac.ea.com/gimex/release/functions/devlib.htm\n",
    "    -gx       http://tools.eac.ea.com/util/gx.htm\n",
    "    -gcmp     http://tools.eac.ea.com/util/gcmp.htm\n",
    "    -ginfo    http://tools.eac.ea.com/util/ginfo.htm\n",
    "    -gshow    http://tools.eac.ea.com/util/gshow.htm\n",
    "    -gclip    http://tools.eac.ea.com/util/gclip.htm\n",
    "    -gis      http://tools.eac.ea.com/util/gis.htm\n",
    "    -cramany  http://tools.eac.ea.com/util/cramany.htm\n",
    "    -acdc     http://tools.eac.ea.com/util/acdc.htm\n",
    "    -abstract http://tools.eac.ea.com/util/abstract.htm\n",
    "    -author   http://tools.eac.ea.com/util/author.htm\n",
    "    -bingrep  http://tools.eac.ea.com/util/bingrep.htm\n",
    "    -bmw      http://tools.eac.ea.com/util/bmw.htm\n",
    "    -chimp    http://tools.eac.ea.com/util/chimp.htm\n",
    "    -cmp      http://tools.eac.ea.com/util/cmp.htm\n",
    "    -copyr    http://tools.eac.ea.com/util/copyr.htm\n",
    "    -crc      http://tools.eac.ea.com/util/crc.htm\n",
    "    -cymbal   http://tools.eac.ea.com/util/cymbal.htm\n",
    "    -chunkify http://tools.eac.ea.com/util/chunkify.htm\n",
    "    -db       http://tools.eac.ea.com/util/db.htm\n",
    "    -dis      http://tools.eac.ea.com/util/dis.htm\n",
    "    -e        http://tools.eac.ea.com/util/e.htm\n",
    "    -eapu     http://tools.eac.ea.com/util/eapu.htm\n",
    "    -gsr      http://tools.eac.ea.com/util/gsr.htm\n",
    "    -grep     http://tools.eac.ea.com/util/grep.htm\n",
    "    -hashid   http://tools.eac.ea.com/util/hashid.htm\n",
    "    -huff     http://tools.eac.ea.com/util/huff.htm\n",
    "    -ie       http://tools.eac.ea.com/util/ie.htm\n",
    "    -locomoto http://tools.eac.ea.com/util/locomoto.htm\n",
    "    -lumpy    http://tools.eac.ea.com/util/lumpy.htm\n",
    "    -lump     http://tools.eac.ea.com/util/lump.htm\n",
    "    -math     http://tools.eac.ea.com/util/math.htm\n",
    "    -mathx    http://tools.eac.ea.com/util/mathx.htm\n",
    "    -sleep    http://tools.eac.ea.com/util/sleep.htm\n",
    "    -spit_eg  http://tools.eac.ea.com/util/spit_eg.htm\n",
    "    -sortshp  http://tools.eac.ea.com/util/sortshp.htm\n",
    "    -tabs     http://tools.eac.ea.com/util/tabs.htm\n",
    "    -timex    http://tools.eac.ea.com/util/timex.htm\n",
    "    -txt      http://tools.eac.ea.com/util/txt.htm\n",
    "    -undup    http://tools.eac.ea.com/util/undup.htm\n",
    "    -unslash  http://tools.eac.ea.com/util/unslash.htm\n",
    "    -url      http://tools.eac.ea.com/util/url.htm\n",
    "    -xd       http://tools.eac.ea.com/util/xd.htm\n",
    "    -xl       http://tools.eac.ea.com/util/xl.htm\n",
    "    -whereis  http://tools.eac.ea.com/util/whereis.htm\n",
    "    -venom    http://tools.eac.ea.com/util/venom.htm\n",
    "    -zcopy    http://tools.eac.ea.com/util/zcopy.htm\n",
    "    -zcut     http://tools.eac.ea.com/util/zcut.htm\n",
    "    -zhelp    http://tools.eac.ea.com/util/zhelp.htm\n",
    "    -zrename  http://tools.eac.ea.com/util/zrename.htm\n",
    "    -zrun     http://tools.eac.ea.com/util/zrun.htm\n",
    "    -chump    http://tools.eac.ea.com/util/chump.htm\n",
    "    -tags     http://tools.eac.ea.com/util/tags.htm\n",
    "    -recurse  http://tools.eac.ea.com/util/recurse.htm\n",
    "    -farmer   http://tools.eac.ea.com/util/farmer.htm\n",
    "    -shpinfo  http://tools.eac.ea.com/util/shpinfo.htm\n",
    "    -fontinfo http://tools.eac.ea.com/util/fontinfo.htm\n",
    "\n",
    "    Gimex modules\n",
    "\n",
    "    -ACT      http://tools.eac.ea.com/gimex/release/functions/ACT.htm\n",
    "    -ANM      http://tools.eac.ea.com/gimex/release/functions/ANM.htm\n",
    "    -AVI      http://tools.eac.ea.com/gimex/release/functions/AVI.htm\n",
    "    -BIF      http://tools.eac.ea.com/gimex/release/functions/BIF.htm\n",
    "    -BMP      http://tools.eac.ea.com/gimex/release/functions/BMP.htm\n",
    "    -BNR      http://tools.eac.ea.com/gimex/release/functions/BNR.htm\n",
    "    -CLP      http://tools.eac.ea.com/gimex/release/functions/CLP.htm\n",
    "    -DDS      http://tools.eac.ea.com/gimex/release/functions/DDS.htm\n",
    "    -EPS      http://tools.eac.ea.com/gimex/release/functions/EPS.htm\n",
    "    -EXE      http://tools.eac.ea.com/gimex/release/functions/EXE.htm\n",
    "    -FLI      http://tools.eac.ea.com/gimex/release/functions/FLI.htm\n",
    "    -FLM      http://tools.eac.ea.com/gimex/release/functions/FLM.htm\n",
    "    -FNT      http://tools.eac.ea.com/gimex/release/functions/FNT.htm\n",
    "    -GIF      http://tools.eac.ea.com/gimex/release/functions/GIF.htm\n",
    "    -GMX      http://tools.eac.ea.com/gimex/release/functions/GMX.htm\n",
    "    -HSI      http://tools.eac.ea.com/gimex/release/functions/HSI.htm\n",
    "    -ICO      http://tools.eac.ea.com/gimex/release/functions/ICO.htm\n",
    "    -IJL      http://tools.eac.ea.com/gimex/release/functions/IJL.htm\n",
    "    -ILBM     http://tools.eac.ea.com/gimex/release/functions/ILBM.htm\n",
    "    -JP2      http://tools.eac.ea.com/gimex/release/functions/JP2.htm\n",
    "    -JPeg     http://tools.eac.ea.com/gimex/release/functions/JPeg.htm\n",
    "    -MOV      http://tools.eac.ea.com/gimex/release/functions/MOV.htm\n",
    "    -MPC      http://tools.eac.ea.com/gimex/release/functions/MPEG.htm\n",
    "    -MPEG     http://tools.eac.ea.com/gimex/release/functions/MPEG.htm\n",
    "    -Mad      http://tools.eac.ea.com/gimex/release/functions/Madcow.htm\n",
    "    -Madcow   http://tools.eac.ea.com/gimex/release/functions/Madcow.htm\n",
    "    -NEW      http://tools.eac.ea.com/gimex/release/functions/NEW.htm\n",
    "    -Nil      http://tools.eac.ea.com/gimex/release/functions/Nil.htm\n",
    "    -PCX      http://tools.eac.ea.com/gimex/release/functions/PCX.htm\n",
    "    -PIC      http://tools.eac.ea.com/gimex/release/functions/PIC.htm\n",
    "    -PIX      http://tools.eac.ea.com/gimex/release/functions/PIX.htm\n",
    "    -PPM      http://tools.eac.ea.com/gimex/release/functions/PPM.htm\n",
    "    -PSD      http://tools.eac.ea.com/gimex/release/functions/PSD.htm\n",
    "    -Png      http://tools.eac.ea.com/gimex/release/functions/Png.htm\n",
    "    -QT3      http://tools.eac.ea.com/gimex/release/functions/QT3.htm\n",
    "    -Qmt      http://tools.eac.ea.com/gimex/release/functions/Qmt.htm\n",
    "    -RAM      http://tools.eac.ea.com/gimex/release/functions/RAM.htm\n",
    "    -RAW      http://tools.eac.ea.com/gimex/release/functions/RAW.htm\n",
    "    -RLA      http://tools.eac.ea.com/gimex/release/functions/RLA.htm\n",
    "    -SCT      http://tools.eac.ea.com/gimex/release/functions/SCT.htm\n",
    "    -SGI      http://tools.eac.ea.com/gimex/release/functions/SGI.htm\n",
    "    -SHP      http://tools.eac.ea.com/gimex/release/functions/SHP.htm\n",
    "    -SIM      http://tools.eac.ea.com/gimex/release/functions/SIM.htm\n",
    "    -STR      http://tools.eac.ea.com/gimex/release/functions/STR.htm\n",
    "    -TGA      http://tools.eac.ea.com/gimex/release/functions/TGA.htm\n",
    "    -TGV      http://tools.eac.ea.com/gimex/release/functions/TGV.htm\n",
    "    -TIF      http://tools.eac.ea.com/gimex/release/functions/TIF.htm\n",
    "    -TIM      http://tools.eac.ea.com/gimex/release/functions/TIM.htm\n",
    "    -TPL      http://tools.eac.ea.com/gimex/release/functions/TPL.htm\n",
    "    -TTF      http://tools.eac.ea.com/gimex/release/functions/TTF.htm\n",
    "\n",
    "    gimex libraries\n",
    "    -codex    http://tools.eac.ea.com/gimex/release/functions/codexindex.htm\n",
    "    -crapi    http://tools.eac.ea.com/gimex/release/functions/crapiindex.htm\n",
    "    -gfilter  http://tools.eac.ea.com/gimex/release/functions/gfilterindex.htm\n",
    "    -stdgimex http://tools.eac.ea.com/gimex/release/functions/stdgimexindex.htm\n",
    "\n",
    "    Other topics\n",
    "\n",
    "    -Freetype http://freetype.sourceforge.net/freetype2/documentation.html\n",
    "    -acdsee   http://tools.eac.ea.com/gimex/release/tools/acdsee/index.htm\n",
    "    -tar      http://www.gnu.org/manual/tar/index.html\n",
    "    -vi       http://www.bris.ac.uk/is/selfhelp/documentation/vi-r2/vi-r2.htm#toc0600\n",
    "    -madcow   http://tools.eac.ea.com/madcow\n",
    "    -zlib     http://www.pkware.com/support/appnote.html\n",
    "    -zip      http://www.organicbit.com/zip\n",
    "    -winzip   http://www.winzip.com/xcmdline.htm\n",
    "\n",
    0,
};


void SPIT_usage(const char *prgname, const char *envname, const char *urlname, int utype)
{
    char **hlp;

    printf("ZHelp v%s by FrANK G. Barchard\n",TextVersion);

    if (utype)
        printf("USAGE: %s -lib function\n", prgname);

    switch (utype)
    {
        case 0:
        case 1:
            break;

        case 2:
            puts("     @ response file       ");
            puts("    -v verbose");
          printf("type '%s -h' for more help\n", prgname);
          printf("type '%s -help' for web page (%s)\n", prgname, urlname);
            break;

        case 3:
            puts("");
          printf("VERSION: %s v%s, Spit v%.2f\n",SPIT_MACHINE,TextVersion,(float)SPIT_VERSION/100.0f);
            puts("SUMMARY: ZHELP fetches web help on topic");
          printf("         SPIT environment variable is %s\n",envname);
            puts("");

            hlp = optionhelp;
            while (*hlp)
            {
                printf("%s",*hlp);
                ++hlp;
            }
            break;

         case 4:
            puts("");
            {
                hlp = optionhelp;
                while (*hlp)
                {
                    if (SPIT_strstr(*hlp,envname))
                        printf("%s",*hlp);
                    ++hlp;
                }
                puts("");
            }
            break;


        default:
            break;
    }
}

char *SPIT_opt(const char *optptr)
{
    char *d;
    char *url;
    char cut[SPITMAXLINE];

    d = SPIT_getfield(cut,optptr,1,0);
    url = findurlshortcut(cut);
    if (url)
    {
        OPTminargs = 0;
        strcpy(OPTwhere,url);
        return(d);
//        return((char *)optptr+findurlshortcutlen(optptr));
    }

    switch (tolower(*optptr))
    {
        case 'u':
            if (!strnicmp(optptr,"url",3))
            {
                d = SPIT_getfield(OPTzhelpurl,optptr+3,1,1);
                return(d);
            }
            break;

        default: break;
    }
    return((char *) 0);
}


int main(int argc,char *argv[])
{
    char baseurl[SPITMAXLINE];
    char fullurl[SPITMAXLINE];
    char *topic;

    OPTwrite = 0;
    OPTbanner = 0;
    OPTminargs = 1;
    OPTzhelpurl[0] = 0;
    OPTwhere[0] = 0;

    SPIT_init(NULL, SPIT_usage, SPIT_opt, SPIT_history);
    SPIT_parse(argc, argv, TOOL_NAME, TOOL_VERSION);

    if (OPTzhelpurl[0])
    {
        strcpy(baseurl,OPTzhelpurl);
    }
    else
    {
        if (OPTwhere[0])
        {
            strcpy(baseurl,OPTwhere);
        }
        else
        {
#ifdef __unix__
            strcpy(baseurl,"http://tools.eac.ea.com/real/ps2/functions/");
#else
            strcpy(baseurl,"http://tools.eac.ea.com/real/pc/functions/");
#endif
        }
    }

    if (SPITargnum)
    {
        topic = findurlshortcut(SPITsargv[0]);
        if (topic)
        {
//            if (topic[strlen(topic)-1]=='/')
//                sprintf(fullurl,"%sindex.htm",topic);
//            else
                sprintf(fullurl,"%s",topic);
        }
        else
        {
            sprintf(fullurl,"%s%s.htm",baseurl,SPITsargv[0]);
        }
    }
    else
    {
        sprintf(fullurl,"%s",baseurl);
//        sprintf(fullurl,"%sindex.htm",baseurl);
    }

    if (SPITargnum || OPTwhere[0])
    {
        if (OPTverbose>=3)
            printf("%s\n",fullurl);
        SPIT_openurl(fullurl);
    }

    return(0);
}

