/* Version control information for "info" command display */
/* Definition for processor type added */
/* Cleanup of information display - K2MF 4/93 */
/* Added Contributors, If Hopper  - WA2ZKD 8/94 */

#include "global.h"
#include "mbuf.h"
#include "socket.h"
#include "version.h"
#include "files.h"
#include "ftp.h"

char shortversion[] = "JNOS1.10g/PSId";

#if (defined(MAILBOX) || defined(MBFWD))
char MboxId[] = "[JNOS-1.10g-IHM$]\n";
#endif /* MAILBOX || MBFWD */

char Version2[] = "by Johan. K. Reinalda, WG7J/PA3DIS\n";

extern int Numrows,Numcols;

char Version[] = "1.10g/PSId("
#if defined LINUX
    "Linux"
#elif defined CPU86
    "8088"
#elif defined CPU186
    "80186"
#elif defined CPU286
    "80286"
#elif defined CPU386
    "80386"
#elif defined CPU486
    "80486"
#elif defined CPU586
    "PENTIUM"
#else
    "cpu unknown"
#endif
    ")";

#ifdef ALLCMD
static char *
compilerver(void)
{
	static char result[24];

#if defined(__GNUC__)
	sprintf(result, "GCC %d", __GNUC__);
#elif defined(__BORLANDC__)
	sprintf(result, "BC %04X", __BORLANDC__);
#elif defined(__TURBOC__)
	sprintf(result, "TC %04X", __TURBOC__);
#else
	strcat(result,"unknown compiler");
#endif
	return(result);
}
#ifndef whofor
#define whofor "anybody"
#endif

int
doinfo(argc,argv,m)
int argc;
char *argv[];
struct mbx *m;
{
    FILE *fp;
    char fname[FILE_PATH_SIZE];	
    tprintf("JNOS %s, compiled %s %s by %s\n\n",
             Version,__DATE__,__TIME__,compilerver());

    tprintf("\nThis Configuration for: %s\n\n",whofor);

    sprintf(fname,"%s/credits.inf",CmdsHelpdir);
    if((fp = fopen(fname,READ_TEXT)) != NULLFILE) {
        sendfile(fp,Curproc->output,ASCII_TYPE,0,m);
        fclose(fp);
    }

    sprintf(fname,"%s/config.inf",CmdsHelpdir);
    if((fp = fopen(fname,READ_TEXT)) != NULLFILE) {
        sendfile(fp,Curproc->output,ASCII_TYPE,0,m);
        fclose(fp);
    }

	return 0;
}

#endif /* ALLCMD */
