コード例 #1
0
ファイル: build.c プロジェクト: msikma/ceegee
/**
 * Formats system information. Here is an example:
 *
 * CeeGee Engine, (C) 2015-2016, Michiel Sikma (MIT license)
 * 
 * TIME=2016-11-24T13:32:40+0100
 * BUILD=103-MASTER 2016-11-24 (DD160F4)
 * CC=i586-pc-msdosdjgpp-gcc (GCC) 5.2.0
 * OS=Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016;
 * root:xnu-3789.21.3~60/RELEASE_X86_64
 * CFLAGS=-DHAVE_STDBOOL_H=1 -DALLEGRO_HAVE_INTTYPES_H -fgnu89-inline -Wall
 * -Wno-unused -O3 -mtune=i586 -ffast-math -fomit-frame-pointer
 * -Ivendor/allegro-4.2.2-xc/include -Ivendor/xorshift -I. -DDEBUG=1
 * LDFLAGS=-Lvendor/allegro-4.2.2-xc/lib/djgpp -lalleg
 */
static void format_sysinfo() {
  if (has_info) {
    return;
  }
  
  // Format all system information into one string.
  snprintf(
    sysinfo,
    sizeof(sysinfo),
    "%s, %s\n\n"
    "TIME=%s\n"
    "BUILD=%s\n"
    "CC=%s\n"
    "OS=%s\n"
    "CFLAGS=%s\n"
    "LDFLAGS=%s\n",
    get_name(),
    get_copyright(),
    get_build_time(),
    get_short_version(),
    get_cc_info(),
    get_os_info(),
    get_cflags(),
    get_ldflags()
  );
}
コード例 #2
0
ファイル: new_server_html_3.c プロジェクト: stden/ejudge
void
ns_footer(
        FILE *out,
        unsigned char const *templ,
        const unsigned char *copyright,
        int locale_id)
{
  if (!copyright) copyright = get_copyright(locale_id);
  if (!templ) templ = ns_default_footer;
  process_template(out, templ, 0, 0, 0, copyright, 0, 0, 0, NULL, NULL);
}
コード例 #3
0
ファイル: main.c プロジェクト: arxopia/hostkit
int _tmain(int argc, _TCHAR *argv[])
{
	int result;

	initialize_arguments();

	if(parse_arguments(argv) != ARGS_OK || arguments.error) 
	{
		_tprintf(_T("%s"), get_help());
		quit();
	}

	if(arguments.debug) 
	{
		_ftprintf(arguments.logFile, _T("Debug log is enabled.\n"));
	}

	if(arguments.version == TRUE) 
	{
		_tprintf(_T("%s"), get_version());
		_tprintf(_T("%s"), get_copyright());
		quit();
	}

	if(arguments.service == TRUE) 
	{
		result = servicize();
		if(result != 0) 
		{
			_ftprintf(arguments.logFile, _T("Unable to install as service.\n"));
		}
		quit();
	}

	if(arguments.persistent == TRUE) 
	{
		result = persist();
		if(result != 0) 
		{
			_ftprintf(arguments.logFail, _T("An occurred when running persistent.\n"));
		}
		quit();
	}

	if(arguments.mode == RM_BASIC) 
	{
		run_basic_scan();
	} 
	else if(arguments.mode == RM_STANDARD) 
	{
		run_standard_scan();
	} 
	else if(arguments.mode == RM_FULL) 
	{
		run_full_scan();
	}

	close_log(arguments.log);

	return 0;
}