X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Ftiming%2Flowleveltime.cxx;h=9d20655d6361ab94904086533a42b0aecff3b465;hb=b47d1ad5fd8ed111cae99c1f65f5bb65a5371501;hp=9aa4e459a6eee07e60d83d563763ec204023b833;hpb=dcb95d131bc6aef1abe25d1f415e309f06e52436;p=simgear.git diff --git a/simgear/timing/lowleveltime.cxx b/simgear/timing/lowleveltime.cxx index 9aa4e459..9d20655d 100644 --- a/simgear/timing/lowleveltime.cxx +++ b/simgear/timing/lowleveltime.cxx @@ -40,6 +40,9 @@ #include #include #include + +#include + #include "lowleveltime.h" @@ -303,16 +306,11 @@ static void fgtzset_internal (int always, const char *tz) /* User specified the empty string; use UTC explicitly. */ tz = "Universal"; -#ifdef macintosh - /* as you well know, mac paths contain leading colon, this code - messes things up.... */ -#else /* A leading colon means "implementation defined syntax". We ignore the colon and always use the same algorithm: try a data file, and if none exists parse the 1003.1 syntax. */ if (tz && *tz == ':') ++tz; -#endif /* Check whether the value changes since the last run. */ if (old_fgtz != NULL && tz != NULL && strcmp (tz, old_fgtz) == 0) @@ -331,19 +329,18 @@ static void fgtzset_internal (int always, const char *tz) fgtzfile_read (tz); if (use_fgtzfile) return; - // The default behaviour of the originale tzset_internal (int always, char* tz) - // function is to set up a default timezone, in any casetz file_read() fails - // Currently this leads to problems, because it modidifies the system timezone + // The default behaviour of the original tzset_internal (int always, char* tz) + // function is to set up a default timezone, in any case file_read() fails + // Currently this leads to problems, because it modifies the system timezone // and not the local aircraft timezone, contained in FlightGear. I could adapt // this in future versions of this code, but doubt whether this is what we really - // want. So right now, exit when timezone information reading failed. + // want. So right now, throw an exception when timezone information reading failed. // Guess I'll change that to something like 12 * (FG_LON / 180.0) // // For now, I'll leave it like this. else { - printf ("Timezone reading failed\n"); - exit(1); + throw sg_exception("Timezone reading failed"); } // this emacs "comment out" function is cool!