/*------------------------------------------------
//
// Module: message.c
//
// Objet : juste un message nph
//
// ToDo  : 
//
//
//
// Maintenance :
//
//     Auteur  : Olivier Booklage
//     Version : V1.0
//     Date    : 20/04/1998
//     Remarq. :
//
//
//
//-----------------------------------------------*/


/* ---       Includes externes       -- */

#include	<stdio.h>
#include	<tos.h>

/* ---       Includes internes       -- */

/* --- Constantes globales internes --- */

/* --- Structures globales internes --- */

/* --- Variables globales  internes --- */


/* ---     Prototypage interne      --- */

int main (void);

/* ---         Fonctions            --- */

int main (void)
{
int retour;
char drive,drive_nr;
char current_path[128];

	drive = 'A' + Dgetdrv();					/* Aktuelles Laufwerk */
	if (drive > 'Z')
		drive = drive - 'Z' + '0';
	if (drive >= '1' && drive <= '6')			/* Laufwerk nach Z mit Big-DOS oder MetaDOS > 2.60 */
		drive_nr = drive - '1' + 26;
	else
		drive_nr = drive - 'A';
	current_path[0] = drive;
	current_path[1] = ':';
	retour = Dgetpath (current_path + 2, drive_nr + 1);
	
	printf("HTTP/1.0 200 ok%c",10);

	printf("content-type: text/html%c%c",10,10);

	printf("<html><title>I'am message.tos</title><body>");
	printf("You have a good name and good password !<br>");

	if ( retour == 0 )
		printf("Current drive is %c and path is %s",drive,current_path + 2);
	else
		printf("Error Dgetpath() %d on drive %c",retour, drive);

	printf("<hr>Have nice day.\n");
	printf("</body></html>");

return(0);
}

/* ---          EOF                 --- */
