Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
compiler.c 11.28 KiB
/******************************************************************************
 * Copyright (c) 2000-2016 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Baji, Laszlo
 *   Balasko, Jeno
 *   Baranyi, Botond
 *   Cserveni, Akos
 *   Delic, Adam
 *   Forstner, Matyas
 *   Kovacs, Ferenc
 *   Kremer, Peter
 *   Lovassy, Arpad
 *   Raduly, Csaba
 *   Szabados, Kristof
 *   Szabo, Janos Zoltan – initial implementation
 *   Zalanyi, Balazs Andor
 *   Pandi, Krisztian
 *
 ******************************************************************************/
/* Main program for the TTCN-3 compiler */

/* C declarations */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include "../../common/memory.h"
#include "../../common/version_internal.h"
#include "../../common/path.h"
#include "../../common/userinfo.h"
#include "compiler.h"
#include "../main.hh"
#include "../error.h"
#include "profiler.h"

#ifdef LICENSE
#include "../../common/license.h"
#endif

#define BUFSIZE 1024

#undef COMMENT_PREFIX
#define COMMENT_PREFIX "// "

static unsigned int nof_updated_files=0;
static unsigned int nof_uptodate_files=0;
unsigned int nof_notupdated_files=0;

static boolean skip_over_lines(FILE *fp, size_t nof_lines)
{
    size_t i = 0;
    while (i < nof_lines) {
	switch (getc(fp)) {
	case EOF:
	    return TRUE;
	case '\n':
	    i++;
	default:
	    break;
	}
    }
    return FALSE;
}