/*                      QBCC Project

This source file is licensed under the GNU Public Licence which should be 
included with the distribution of this source.

*/
// Misc. Functions

#include "qbcc.h"

///////////////////
// Add the standard header the the output C file
void AddStandard(void)
{
	time_t now;

	fprintf(outfile, "/* Quick BASIC Compatible Compiler - C Output File\n");
	fprintf(outfile, " * Copyright (c) Martyn McDonnell, 2000\n");	
	fprintf(outfile, " * Original Concept: Martyn 'leroy' McDonnell\n");
	fprintf(outfile, " * Coding: Jason Boettcher\n");	
	fprintf(outfile, " * Using QBCC version: " VERSION "\n");
	time(&now);
	fprintf(outfile, " * %s compiled on %s", OrigName, asctime(localtime(&now)));
	fprintf(outfile, " */\n\n");
	
	// No need for writing the include's. The BI files handle that
}

///////////////////
// Print Depth
void PrintDepth(char *retstr)
{
	int n;
	for(n=0;n<Indent;n++)
		strcat(retstr," ");
}

///////////////////
// My Duplicate String
void MyDupStr(char *text,char *text2,int start)
{
	unsigned int n;
	for(n=start;n<=strlen(text);n++)
		text2[n-start] = text[n];
}