~ubuntu-branches/ubuntu/lucid/wmmoonclock/lucid

« back to all changes in this revision

Viewing changes to Src/wmMoonClock.c

  • Committer: Bazaar Package Importer
  • Author(s): Denis Briand
  • Date: 2009-07-26 10:30:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090726103000-2y5ws6okikxakvfp
Tags: 1.27-28
* Add southern hemisphere support (Closes: #537480).
  Thanks to Alvaro Steiger.
* Bump standards version to 3.8.2.0
* Add quilt patch system.
* Add patches:
  + 01_all_previous_diff.diff
  + 02_update_time.diff
  + 03_add_southern_hemisphere_support.diff
  + 04_fix_hyphen_used_as_minus_sign.diff
* Add debhelper 7 build depends.
* Add debian/compat file.
* Remove trailing whitespaces in changelog.upstream.
* Add an empty watch file (no upstream repository).
* Improve rules file by using more debhelper commands.
* Remove Martin A. Godisch from uploaders field
  Thanks to him to have sponsored wmmoonclock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
#include <X11/X.h>
113
113
#include <X11/xpm.h>
114
114
#include "CalcEphem.h"
115
 
#include "MoonRise.h"
116
115
#include "xutils.h"
117
116
#include "wmMoonClock_master.xpm"
118
117
#include "wmMoonClock_masterLow.xpm"
123
122
/* 
124
123
 *  Delay between refreshes (in microseconds) 
125
124
 */
126
 
#define DELAY 1000000L
 
125
#define DELAY 10000L
127
126
#define WMMOONCLOCK_VERSION "1.27"
128
127
 
129
128
 
160
159
 
161
160
    struct tm           *GMTTime, *LocalTime;
162
161
    XEvent              event;
163
 
    int                 i, n, j, ImageNumber, Year, Month, DayOfMonth, digit;
 
162
    int                 i, n, k, j, ImageNumber;
 
163
    int                 Year, Month, DayOfWeek, DayOfMonth;
 
164
    int                 Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
164
165
    long                CurrentLocalTime, CurrentGMTTime, date;
165
166
    double              UT, val, RA, DEC, UTRise, UTSet, LocalHour, hour24();
166
167
    int                 D, H, M, S, sgn, A, B, q;
 
168
    char                str[10];
167
169
    CTrans              c;
168
 
    struct timeval      timeout;
169
 
    fd_set              xfdset;
170
170
 
171
171
 
172
172
 
251
251
            } else if (ToggleWindow == 1){
252
252
 
253
253
                /*
254
 
                 *  Update Numerical Display 
 
254
                 *  Update Numerical Display
255
255
                 */
256
256
 
257
 
                /* This requires second precision for LT and UT */
258
 
                nMAX = 0;
 
257
 
 
258
                nMAX = 500;
259
259
 
260
260
 
261
261
                /*
371
371
                 */
372
372
 
373
373
 
374
 
                nMAX = 60;
 
374
                nMAX = 500;
375
375
 
376
376
                /*
377
377
                 * Clear plotting area
478
478
 
479
479
 
480
480
 
481
 
                nMAX = 3;
 
481
                nMAX = 500;
482
482
 
483
483
                /*
484
484
                 * Clear plotting area
580
580
 
581
581
 
582
582
 
583
 
                nMAX = 3;
 
583
                nMAX = 500;
584
584
 
585
585
                /*
586
586
                 * Clear plotting area
705
705
 
706
706
 
707
707
 
708
 
        /*
709
 
         *  Add X display to file descriptor set for polling.
710
 
         */
711
 
        FD_ZERO(&xfdset);
712
 
        FD_SET(ConnectionNumber(display), &xfdset);
713
708
 
714
709
 
715
710
 
739
734
         *  Redraw and wait for next update 
740
735
         */
741
736
        RedrawWindow();
742
 
        timeout.tv_sec = DELAY / 1000000L;
743
 
        timeout.tv_usec = DELAY % 1000000L;
744
 
        select(ConnectionNumber(display) + 1, &xfdset, NULL, NULL, &timeout);
 
737
        usleep(DELAY);
745
738
 
746
739
 
747
740
     }