home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2302 / main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  5.5 KB  |  211 lines

  1. /*
  2.  * Author: Jason Baietto, jason@ssd.csd.harris.com
  3.  * xdiary Copyright 1990 Harris Corporation
  4.  *
  5.  * Permission to use, copy, modify, and distribute, this software and its
  6.  * documentation for any purpose is hereby granted without fee, provided that
  7.  * the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the name of the copyright holder be used in
  10.  * advertising or publicity pertaining to distribution of the software with
  11.  * specific, written prior permission, and that no fee is charged for further
  12.  * distribution of this software, or any modifications thereof.  The copyright
  13.  * holder makes no representations about the suitability of this software for
  14.  * any purpose.  It is provided "as is" without express or implied warranty.
  15.  *
  16.  * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  17.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND IN NO
  18.  * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  19.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ITS USE,
  20.  * LOSS OF DATA, PROFITS, QPA OR GPA, WHETHER IN AN ACTION OF CONTRACT,
  21.  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
  22.  * THE USE OR PERFORMANCE OF THIS SOFTWARE.
  23.  */
  24.  
  25. #define SUNDAY    0
  26. #define MONDAY    1
  27. #define TUESDAY   2
  28. #define WEDNESDAY 3
  29. #define THURSDAY  4
  30. #define FRIDAY    5
  31. #define SATURDAY  6
  32.  
  33. #define JANUARY     1
  34. #define FEBRUARY    2
  35. #define MARCH       3
  36. #define APRIL       4
  37. #define MAY         5
  38. #define JUNE        6
  39. #define JULY        7
  40. #define AUGUST      8
  41. #define SEPTEMBER   9
  42. #define OCTOBER     10
  43. #define NOVEMBER    11
  44. #define DECEMBER    12
  45.  
  46. #define ENGLISH 0
  47. #define GERMAN  1
  48. #define SPANISH 2
  49. #define FRENCH  3
  50. #define ITALIAN 4
  51.  
  52.  
  53. static char * month_names[][13] = {
  54.    {
  55.       /* ENGLISH */
  56.       "January", "February", "March", "April", "May", "June", "July",
  57.       "August", "September", "October", "November", "December", NULL
  58.    },
  59.    {
  60.       /* GERMAN */
  61.       "Januar", "Februar", "M\344rz", "April", "Mai", "Juni", "Juli",
  62.       "August", "September", "Oktober", "November", "Dezember", NULL
  63.    },
  64.    {
  65.       /* SPANISH */
  66.       "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio",
  67.       "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre", NULL
  68.    },
  69.    {
  70.       /* FRENCH */
  71.       "Janvier", "F\351vrier", "Mars", "Avril", "Mai", "Juin", "Juillet",
  72.       "Auguste", "Septembre", "Octobre", "Novembre", "D\351cembre", NULL
  73.    }
  74. };
  75.  
  76.  
  77. static char * weekday_names[][8] = {
  78.    {
  79.       /* ENGLISH */
  80.       "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
  81.       "Friday", "Saturday", NULL
  82.    },
  83.    {
  84.       /* GERMAN */
  85.       "Sontag", "Montag", "Dienstag", "Mittwoch", "Donnerstag",
  86.       "Freitag", "Samstag", NULL
  87.    },
  88.    {
  89.       /* SPANISH */
  90.       "Domingo", "Lunes", "Martes", "Mi\351rcoles", "Jueves", "Viernes",
  91.       "S\341bado",  NULL
  92.    },
  93.    {
  94.       /* FRENCH */
  95.       "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi",
  96.       "Samedi", NULL
  97.    }
  98. };
  99.  
  100. static char * quit_label[] = {
  101.    /* ENGLISH */ "Quit",
  102.    /* GERMAN  */ "Aufgeben",
  103.    /* SPANISH */ "Descargar",
  104.    /* FRENCH  */ "Quitte"
  105. };
  106.  
  107. static char * day_label[] = {
  108.    /* ENGLISH */ "Day",
  109.    /* GERMAN  */ "Tag",
  110.    /* SPANISH */ "Dia",
  111.    /* FRENCH  */ "Jour"
  112. };
  113.  
  114. static char * entry_label[] = {
  115.    /* ENGLISH */ "Entry",
  116.    /* GERMAN  */ "Eintritt",
  117.    /* SPANISH */ "Entrada",
  118.    /* FRENCH  */ "Entre\351"  /* e' */
  119. };
  120.  
  121. static char * month_label[] = {
  122.    /* ENGLISH */ "Month",
  123.    /* GERMAN  */ "Monat",
  124.    /* SPANISH */ "Mes",
  125.    /* FRENCH  */ "Mois"
  126. };
  127.  
  128. static char * year_label[] = {
  129.    /* ENGLISH */ "Year",
  130.    /* GERMAN  */ "Jahr",
  131.    /* SPANISH */ "A\361o",    /* n~ */
  132.    /* FRENCH  */ "Ann\351e"   /* e' */
  133. };
  134.  
  135. static char * warp_label[] = {
  136.    /* ENGLISH */ "Warp",
  137.    /* GERMAN  */ "Reisen",
  138.    /* SPANISH */ "Viajar",
  139.    /* FRENCH  */ "Voyage"
  140. };
  141.  
  142. static char * today_label[] = {
  143.    /* ENGLISH */ "Today",
  144.    /* GERMAN  */ "Heute",
  145.    /* SPANISH */ "Hoy",
  146.    /* FRENCH  */ "Aujourd'hui"
  147. };
  148.  
  149. static char * dialog_label[] = {
  150.    /* ENGLISH */ "Destination:",
  151.    /* GERMAN  */ "Bestimmung:",
  152.    /* SPANISH */ "Destino:",
  153.    /* FRENCH  */ "Destination:"  /* Same as English */
  154. };
  155.  
  156. static char * diary_label[] = {
  157.    /* ENGLISH */ "Diary",
  158.    /* GERMAN  */ "Tagebuch",
  159.    /* SPANISH */ "Diario",
  160.    /* FRENCH  */ "Agenda"
  161. };
  162.  
  163. static char * option_label[] = {
  164.    /* ENGLISH */ "Option",
  165.    /* GERMAN  */ "Option",    /* Same as English */
  166.    /* SPANISH */ "Opci\363n", /* o' */
  167.    /* FRENCH  */ "Option"     /* Same as English */
  168. };
  169.  
  170. static char * single_label[] = {
  171.    /* ENGLISH */ "Single",
  172.    /* GERMAN  */ "Einzig",
  173.    /* SPANISH */ "Solo",
  174.    /* FRENCH  */ "Unique"
  175. };
  176.  
  177. static char * full_label[] = {
  178.    /* ENGLISH */ "Full",
  179.    /* GERMAN  */ "Voll",
  180.    /* SPANISH */ "Completo",
  181.    /* FRENCH  */ "Complet"
  182. };
  183.  
  184. static char * save_label[] = {
  185.    /* ENGLISH */ "Save",
  186.    /* GERMAN  */ "Speichern",
  187.    /* SPANISH */ "Salve",
  188.    /* FRENCH  */ "Sauver"
  189. };
  190.  
  191. #define MAX_WIDGETS 25
  192.  
  193. /* in milliseconds */
  194. #define ONE_SECOND          (1000) 
  195. #define ONE_MINUTE          (60 * ONE_SECOND)
  196. #define FIVE_MINUTES        (5  * ONE_MINUTE)
  197. #define ONE_HOUR            (60 * ONE_MINUTE)
  198. #define TWENTY_FOUR_HOURS   (24 * ONE_HOUR)
  199.  
  200. #define DIARY_FILE "/.xdiary"
  201. #define TEMPLATE_FILE "/.xdiary-template"
  202.  
  203. #define DAY   (1L<<1)
  204. #define MONTH (1L<<2)
  205. #define YEAR  (1L<<3)
  206. #define ENTRY (1L<<4)
  207.  
  208. #ifndef MAXPATHLEN
  209. #define MAXPATHLEN 1024
  210. #endif
  211.