YaK:: NDT Enhancement for Probulator [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

NDT Enhancement for Probulator

This diff against Peachtree Linux   Probulator Version 1.0 will print the time in Newfoundland Daylight Time, which could also be useful in some parts of Labrador.

Ce diff contre la version 1,0 de Peachtree Linux   Probulator imprimera le temps dans Heure Avancée de Terre-Neuve, qui pourrait également être utile dans quelques parties de Labrador.


--- lsfw.c      2005-04-29 03:17:00.000000000 +0100
+++ lsfw_ndt.c  2005-07-03 02:34:46.000000000 +0100
@@ -78,6 +78,23 @@
    return *buf;
 }

+
+#include <time.h>
+
+probul8_NDT()
+{
+
+       char *cp;
+       long t= time(0);
+       t = t - 150 * 60;  /* NDT is UTC-2:30 */
+
+       cp= ctime( &t );
+       cp[ strlen(cp)-1 ]= '\0';
+
+       fprintf( stderr, "The time is %s NDT.\n", cp );
+
+}
+
 int main(void)
 {
    char *buf=NULL;
@@ -92,6 +109,8 @@
    char *specifier_id=NULL;
    char *version=NULL;

+   probul8_NDT();
+

    if ((devices=fopen(DEVICES_FILE, "r"))==NULL) {
       perror("Unable to open " DEVICES_FILE);
@@ -177,5 +196,6 @@
    free(version);
    free(specifier_id);
    free(buf);
+
    return exit_status;
 }

(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2005-07-03)       [Login]
(No back references.)