GRASS Programmer's Manual  6.4.2(2012)
sign.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1995.  Bill Brown <brown@gis.uiuc.edu> & Michael Shapiro
00003  *
00004  * This program is free software under the GPL (>=v2)
00005  * Read the file GPL.TXT coming with GRASS for details.
00006  */
00007 #include <grass/datetime.h>
00008 
00009 
00021 int datetime_is_positive(const DateTime * dt)
00022 {
00023     return dt->positive != 0;
00024 }
00025 
00037 int datetime_is_negative(const DateTime * dt)
00038 {
00039     return dt->positive == 0;
00040 }
00041 
00042 
00052 void datetime_set_positive(DateTime * dt)
00053 {
00054     dt->positive = 1;
00055 }
00056 
00057 
00067 void datetime_set_negative(DateTime * dt)
00068 {
00069     dt->positive = 0;
00070 }
00071 
00072 
00080 void datetime_invert_sign(DateTime * dt)
00081 {
00082     dt->positive = !dt->positive;
00083 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines