Commit b9d87032 authored by claes's avatar claes

Adapted to new ldh design

parent 33b793bd
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(wb_msg_eobjs) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o $(pwr_obj)/wb_provider.o \
-L/usr/X11R6/lib -L/usr/local/BerkeleyDB.4.0/lib \
-L/opt/gnome/lib \
-lpwr_wb -lpwr_rt -lpwr_ge -lpwr_flow -lpwr_glow -lpwr_co \
-lpwr_msg_dummy -lantlr -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lXmu -lSM -lICE\
-lrpcsvc -lpthread -lm -lrt -ldb_cxx -lz
endif
/*
* Proview $Id: wb_ldlist.cpp,v 1.1 2006-05-11 07:11:22 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* wb_ldlist.c --
Lists load data files. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream.h>
#include "pwr.h"
#include "co_time.h"
#include "wb_erep.h"
#include "wb_vrepdbs.h"
static void usage( char *txt)
{
cout << txt << endl;
}
int main (
int argc,
char *argv[]
)
{
int bflag = 0;
int oflag = 0;
char c;
pwr_tTime time;
char timestr[40];
while (--argc > 0 && (*++argv)[0] == '-') {
while ((c = *++argv[0])) {
switch (c) {
case 'o':
++oflag;
break;
case 'b':
++bflag;
break;
default:
usage("Unknown flag");
}
}
}
if ((*argv)[0] == '?') usage(0);
if (argc < 1) usage("No load file given!\n");
wb_erep *erep = new wb_erep();
wb_vrepdbs *vrep = new wb_vrepdbs( erep, *argv);
vrep->load();
vrep->time( &time);
time_AtoAscii( &time, time_eFormat_DateAndTime, timestr, sizeof(timestr));
cout << "Name : " << vrep->name() << endl <<
"Time : " << timestr << " (" << time.tv_sec << "," << time.tv_nsec << ")" << endl;
// lf = fopen(*argv, "rb");
}
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