Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
124 lines
3.3 KiB
C
124 lines
3.3 KiB
C
/* --------------------------------------------------------------------
|
|
/ $HeadURL$
|
|
/ --------------------------------------------------------------------
|
|
/ --------------------------------------------------------------------
|
|
/ COPYRIGHT (C) 1999: STN ATLAS ELEKTRONIK GMBH, D-28305 BREMEN
|
|
/ --------------------------------------------------------------------
|
|
/
|
|
/ HIER/ITEM : CSU: RP 5182 P 100 SRC 57501
|
|
/ BRIEF DESC: Zeitwandelroutinen
|
|
/ AUTHOR : Norbert Thoden
|
|
/ RELEASE :
|
|
/ MODIF/STAT: dd.mm.yy
|
|
/ ORIGIN REF:
|
|
/
|
|
/ Revision INFO:
|
|
/ --------------
|
|
/ $Revision$
|
|
/ $Date$
|
|
/ $Id$
|
|
/
|
|
/ LANGUAGE: C++ (Compiler: MipsPro C++ Version: 7.30)
|
|
/
|
|
/ PURPOSE:
|
|
/ --------
|
|
/ Zeitwandelroutinen
|
|
/
|
|
/ ERROR HANDLING:
|
|
/ ---------------
|
|
/ keine
|
|
/
|
|
*/
|
|
|
|
/*------------------ includes ----------------------------*/
|
|
|
|
#include <time.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
time_t time_l;
|
|
struct tm time_str;
|
|
char dummy[5];
|
|
int jahr;
|
|
|
|
if (argc == 2 && strcmp(argv[1], "now") == 0)
|
|
{
|
|
printf("Sekunden: %ld\n", time(NULL));
|
|
return 0;
|
|
}
|
|
|
|
/* zu wenig Uebergabeparameter */
|
|
if (argc <= 2)
|
|
{
|
|
printf("\nBitte das Datum und die Zeit mit uebergeben!");
|
|
printf("\nz.B. 26.03.1997 10:10:00\n\n");
|
|
return 3;
|
|
}
|
|
|
|
if (argv[1][2] != '.' || argv[1][5] != '.' || argv[2][2] != ':' || argv[2][5] != ':' ||
|
|
strlen(argv[1]) != 10)
|
|
{
|
|
/* Ueberpruefen der Eingabeparameter */
|
|
printf("\nFehler bei der Datums- oder Uhrzeiteingabe!");
|
|
printf("\nGefordertes Format : 26.03.1997 10:10:00\n\n");
|
|
return 2;
|
|
}
|
|
|
|
sprintf(dummy, "%c%c%c%c", argv[1][6], argv[1][7], argv[1][8], argv[1][9]);
|
|
jahr = atoi(dummy) - 1900;
|
|
|
|
/* Eintragen des Datums und der Uhrzeit in die tm-Struktur */
|
|
time_str.tm_mday = 10 * ((int)(argv[1][0]) - 48)
|
|
+ (int)(argv[1][1]) - 48;
|
|
time_str.tm_mon = 10 * ((int)(argv[1][3]) - 48)
|
|
+ (int)(argv[1][4]) - 49;
|
|
time_str.tm_year = jahr;
|
|
time_str.tm_hour = 10 * ((int)(argv[2][0]) - 48)
|
|
+ (int)(argv[2][1]) - 48;
|
|
time_str.tm_min = 10 * ((int)(argv[2][3]) - 48)
|
|
+ (int)(argv[2][4]) - 48;
|
|
time_str.tm_sec = 10 * ((int)(argv[2][6]) - 48)
|
|
+ (int)(argv[2][7]) - 48;
|
|
time_str.tm_isdst = 0;
|
|
|
|
/* tm_mday - Plausibilitaetstest */
|
|
if (time_str.tm_mday < 1 || time_str.tm_mday > 31)
|
|
{
|
|
printf("\nTagesangabe nicht korrekt!\n\n");
|
|
return 1;
|
|
}
|
|
/* tm_mon - Plausibilitaetstest */
|
|
if (time_str.tm_mon < 0 || time_str.tm_mon > 11)
|
|
{
|
|
printf("\nMonatsangabe nicht korrekt!\n\n");
|
|
return 1;
|
|
}
|
|
/* tm_hour - Plausibilitaetstest */
|
|
if (time_str.tm_hour < 0 || time_str.tm_hour > 23)
|
|
{
|
|
printf("\nStundenangabe nicht korrekt!\n\n");
|
|
return 1;
|
|
}
|
|
/* tm_min - Plausibilitaetstest */
|
|
if (time_str.tm_min < 0 || time_str.tm_min > 59)
|
|
{
|
|
printf("\nMinutenangabe nicht korrekt!\n\n");
|
|
return 1;
|
|
}
|
|
/* tm_sec - Plausibilitaetstest */
|
|
if (time_str.tm_sec < 0 || time_str.tm_sec > 59)
|
|
{
|
|
printf("\nSekundenangabe nicht korrekt!\n\n");
|
|
return 1;
|
|
}
|
|
|
|
if ((time_l = mktime(&time_str)) == -1)
|
|
printf("\nKalenderzeit konnte nicht bestimmt werden!\n\n");
|
|
else
|
|
printf("\nSekunden: %ld \n\n", time_l);
|
|
return 0;
|
|
}
|