/*
**      mod_w3msql.c       -  Anything specific to w3-msql
**
**
** Copyright (c) 1995-96  Hughes Technologies Pty Ltd
**
** Permission to use, copy, and distribute for non-commercial purposes,
** is hereby granted without fee, providing that the above copyright
** notice appear in all copies and that both the copyright notice and this
** permission notice appear in supporting documentation.
**
** The software may be modified for your own purposes, but modified versions
** may not be distributed.
**
** This software is provided "as is" without any expressed or implied warranty.
**
*/


#include <stdio.h>
#include <errno.h>
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/signal.h>
#include <fcntl.h>

#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>

#include <common/portability.h>
#include "lite.h"
#include "regexp/regexp.h"

#include <time.h>

extern  sym_t   *externReturn;


void doFatal(params)
	plist_t	*params;
{
        checkContentType();
        printf("</h1></h2></h3></h4></h5></h6>\n");
        printf("</select></ul></dl></ol></table>\n");
        printf(params->sym->val);
        printf("<P>Error at line %d",simGetLineNum());
        exit(1);

}


void doUrlEncode(params)
        plist_t *params;
{
        char    *str,
                *new,
                *cp;

        str = params->sym->val;
        new = (char *)HTEscape(str);
        cp = new;
        while(*cp)
        {
                if (*cp == ' ')
                        *cp = '+';
                cp++;
        }
        externReturn = createCharSymbol(new);
        free(new);
}



