Commit 219a5df1 authored by claes's avatar claes

Utility function to get system name for web generation

parent efd91b85
#include <stdio.h>
#include <stdlib.h>
#include "pwr.h"
extern "C" {
#include "co_dcli.h"
#include "rt_load.h"
}
int ge_get_systemname(
char *systemname
)
{
FILE *file;
int nr;
char fname[120];
dcli_translate_filename( fname, load_cNameSysObject);
file = fopen( fname, "r");
if ( file == 0) {
printf("** Warning, systemname not found\n");
return 0;
}
nr = fscanf( file, "%s", systemname);
fclose(file);
if ( nr != 1) return 0;
return 1;
}
#ifndef ge_util_h
#define ge_util_h
/* ge_util.h -- Utility functions for ge
PROVIEW/R
Copyright (C) 1996 by Comator Process AB.
<Description>. */
int ge_get_systemname(
char *systemname
);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment