"Fossies" - the Fresh Open Source Software Archive

Member "remind-03.03.09/examples/defs.rem" (15 Oct 2021, 19880 Bytes) of package /linux/misc/remind-03.03.09.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #############################################################################
    2 # 									    #
    3 # DEFS.REM								    #
    4 # 									    #
    5 # This file is a reminder script, which contains a few handy definitions.   #
    6 # Cut and paste as desired!  Also, near the end, there are a bunch of	    #
    7 # holiday definitions for the U.S.					    #
    8 # 									    #
    9 # Some examples provided by George M. Sipe <gsipe@pyratl.ga.pyramid.com>    #
   10 # 									    #
   11 # U.S. holidays provided by Dave Rickel <drickel@sjc.mentorg.com>	    #
   12 # 									    #
   13 # Use your text editor to search for:					    #
   14 #  "#USHOLS" for U.S. holidays						    #
   15 #  "#JHOLS"  for Jewish holidays					    #
   16 #  "#PSSTUFF" for nifty PostScript examples				    #
   17 #  "#COLORS" for examples of ANSI color escape sequences.                   #
   18 # 									    #
   19 # This file is part of REMIND.						    #
   20 # Copyright (C) 1992-2018 Dianne Skoll                                      #
   21 # 									    #
   22 #############################################################################
   23 
   24 RUN OFF
   25 
   26 ################################################
   27 # Ensure required version of remind is used... #
   28 ################################################
   29 IF version() < "03.01.09"
   30    ERRMSG This file requires at least version 03.01.09 of Remind.%
   31    ERRMSG This version is version [version()].
   32    EXIT
   33 ENDIF
   34 
   35 ######################################
   36 # Symbolic constants for weekdays... #
   37 ######################################
   38 SET Sunday    0
   39 SET Monday    1
   40 SET Tuesday   2
   41 SET Wednesday 3
   42 SET Thursday  4
   43 SET Friday    5
   44 SET Saturday  6
   45 
   46 SET Sun 0
   47 SET Mon 1
   48 SET Tue 2
   49 SET Wed 3
   50 SET Thu 4
   51 SET Fri 5
   52 SET Sat 6
   53 
   54 #########################################
   55 # Symbolic constants for month names... #
   56 #########################################
   57 
   58 SET Jan 1
   59 SET Feb 2
   60 SET Mar 3
   61 SET Apr 4
   62 SET May 5
   63 SET Jun 6
   64 SET Jul 7
   65 SET Aug 8
   66 SET Sep 9
   67 SET Oct 10
   68 SET Nov 11
   69 SET Dec 12
   70 
   71 SET January   1
   72 SET February  2
   73 SET March     3
   74 SET April     4
   75 SET May       5
   76 SET June      6
   77 SET July      7
   78 SET August    8
   79 SET September 9
   80 SET October   10
   81 SET November  11
   82 SET December  12
   83 
   84 ###########################################################
   85 # Other symbolic constants and functions for "pasting"... #
   86 ###########################################################
   87 SET Quote CHAR(34)
   88 
   89 # Handy constants/function for specifing week of month...
   90 SET  Week_1		 1
   91 SET  Week_2		 8
   92 SET  Week_3		15
   93 SET  Week_4		22
   94 FSET _last(mo)		"1 " + MON((mo%12)+1) + " --7"
   95 
   96 # Handy function to provide SCANFROM dates...
   97 FSET _back(days)	$U-days
   98 
   99 #################################################################
  100 # Function that removes a single leading zero from a string...  #
  101 #################################################################
  102 FSET _no_lz(s) IIF(SUBSTR(s, 1, 1)=="0", SUBSTR(s, 2), s)
  103 
  104 #################################################################
  105 # Return the length of the daylight/night portion of a date,    #
  106 # in minutes.                                                   #
  107 #################################################################
  108 FSET _light_len(date) MAX(SUNSET(date)-SUNRISE(date), 0)
  109 FSET _dark_len(date) 1440-_light_len(date)
  110 
  111 ############################################################
  112 # Function to calculate number of years since a given year #
  113 # or number of months since a given month and year...      #
  114 ############################################################
  115 FSET _yr_num(yr)		ORD($Ty - yr)
  116 FSET _mo_num(mo, yr)		ORD(12 * ($Ty - yr) + $Tm - mo)
  117 
  118 # Here's an example of how to use them:
  119 REM 1 Nov ++12 MSG %"John's [_yr_num(1984)] birthday%" is %b.
  120 REM 1 MSG John's [_mo_num(11, 1984)] 'monthly' anniversary
  121 
  122 #############################################################################
  123 # Here's a tricky problem:  The 4th of July is a holiday in the U.S.
  124 # However, if it falls on a Saturday, the previous Friday is a holiday.
  125 # If it falls on a Sunday, the next Monday is a holiday.  Here's how
  126 # to do it.  NOTE that the following procedure makes the OMIT context
  127 # dependent upon the current date.  SInce it only depends on the current
  128 # year, which is not likely to change while producing a calendar, we
  129 # are fairly safe.  However, reminders with huge DELTA or BACK components
  130 # may not operate as expected.  In general, any time you make OMIT
  131 # dependent upon the current date, it's tricky and results may not be
  132 # what you expect.  You should try to make sure that the OMIT context
  133 # "near" any current reminders will not change during a calendar run.
  134 # The SCANFROM clause will make these OMITs safe.
  135 ############################################################################
  136 
  137 # Calculate the weekday of the holiday.
  138 REM 4 July SCANFROM [_back(7)] SATISFY 1
  139 
  140 SET iday $T
  141 IF WKDAYNUM(iday) == Sat
  142 	REM [iday] MSG Independence day (actual)
  143 	OMIT [iday-1] MSG Independence day (observed)
  144 ELSE
  145 	IF WKDAYNUM(iday) == Sun
  146 		REM [iday] MSG Independence day (actual)
  147 		OMIT [iday+1] MSG Independence day (observed)
  148 	ELSE
  149 		OMIT [iday] MSG Independence day
  150 	ENDIF
  151 ENDIF
  152 
  153 ############################################################################
  154 # A meeting on the first Monday of every month which is moved to the       #
  155 # second Monday in the event of a holiday.                                 #
  156 ############################################################################
  157 
  158 # First, the normal meeting.  However, the SKIP keyword means this
  159 # one won't be triggered if the first Monday is a holiday
  160 REM Mon 1 SKIP MSG Meeting
  161 
  162 # Now, calculate the "potential" delayed meeting
  163 REM Mon 8 SATISFY 1
  164 
  165 # But only actually trigger the delayed meeting if the previous
  166 # Monday was a holiday
  167 IF ISOMITTED($T-7)
  168    REM [$T] MSG Delayed meeting
  169 ENDIF
  170 
  171 ##########################################################################
  172 #								         #
  173 # On our UNIX system, I run a program that queries the university       #
  174 # library and creates a file called ".booksdue".  This file is           #
  175 # a REMIND script to tell me when my library books are due.  Here's      #
  176 # an example from my reminder file - it shows the use of filedate().     #
  177 # When the .booksdue file is at least 7 days old, I create a new version #
  178 # by querying the library computer.  Note the use of realtoday() rather  #
  179 # than today().  						         #
  180 #								         #
  181 ##########################################################################
  182 IF !$RunOff && !$CalMode && !$SimpleCal
  183    IF REALTODAY()-FILEDATE("/home/dfs/.booksdue") >= 7
  184       REM RUN /home/dfs/bilge/library/getbooks
  185    ENDIF
  186 ENDIF
  187 
  188 #PSSTUFF1
  189 ##########################################################################
  190 #								         #
  191 # This portion of the file contains some cute examples of the new        #
  192 # PS-type reminders.  You need a PostScript printer or viewer to         #
  193 # appreciate these.  To use them, pipe the output of remind -p into the  #
  194 # rem2ps program.  More examples are in the PSSTUFF2 section, below.     #
  195 #								         #
  196 ##########################################################################
  197 
  198 # The following reminder will shade the Saturday and Sunday calendar
  199 # entries.
  200 REM Sat Sun SPECIAL SHADE 220
  201 
  202 #USHOLS
  203 #############################################################################
  204 #       								    #
  205 # The following holidays were provided by Dave Rickel			    #
  206 # Modified by D. Skoll to give safe OMITs for moveable holidays		    #
  207 #									    #
  208 #############################################################################
  209 
  210 SET SaveTrig $NumTrig
  211 SET easter EASTERDATE($Uy)
  212 REM  [easter-46] MSG %"Ash Wednesday%"
  213 REM  [easter-7]  MSG %"Palm Sunday%"
  214 OMIT [easter-2]  MSG %"Good Friday%"
  215 OMIT [easter]    MSG %"Easter%" Sunday
  216 REM  [easter+39] MSG %"Ascension Day%"
  217 REM  [easter+49] MSG %"Pentecost%"
  218 
  219 # Some holidays are omitted, some are not.  You may want to change
  220 # which ones are omitted - use the general forms shown below.
  221 # You'll need the _back() function and the Week_n variables defined
  222 # way up in the file.
  223 
  224 OMIT     Jan  1		MSG %"New Year's%" Day
  225 REM  Mon Jan [Week_3]	MSG Martin Luther King - %"MLK Day%"
  226 REM      Feb  2		MSG %"Ground Hog Day%"
  227 REM      Feb 14		MSG %"Valentine's%" Day
  228 REM  Mon Feb [Week_3]	SCANFROM [_back(7)] SATISFY 1
  229 OMIT [$T] MSG %"President's Day%"
  230 REM      Mar 17		MSG %"St. Patrick's%" Day
  231 
  232 # The DST rules are accurate for most locations in
  233 # North America
  234 REM Sun Apr 1 ++2 UNTIL 1 Jan 2007 MSG Daylight Saving Time - %"DST starts%" %b
  235 REM Sun Mar 8 ++2 FROM 1 Jan 2007 MSG Daylight Saving Time - %"DST starts%" %b
  236 
  237 REM Sun [_last(Oct)] ++2 UNTIL 1 Jan 2007 MSG Daylight Saving Time - %"DST ends%" %b
  238 REM Sun 1 Nov ++2 FROM 1 Jan 2007 MSG Daylight Saving Time - %"DST ends%" %b
  239 
  240 REM      Apr  1		MSG %"April Fool's%" Day
  241 REM  Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
  242 REM      May  5		MSG %"Cinco de Mayo%"
  243 REM  Sat May [Week_1]	MSG %"Kentucky Derby%"
  244 REM  Sun May [Week_2]	MSG %"Mother's Day%"
  245 REM  Sat May [Week_3]	MSG %"Armed Forces Day%"
  246 REM  Mon [_last(May)]	SCANFROM [_back(7)] SATISFY 1
  247 OMIT [$T] MSG %"Memorial Day%"
  248 REM      Jun 14		MSG %"Flag Day%"
  249 REM  Sun Jun [Week_3]	MSG %"Father's Day%"
  250 REM  Mon Sep [Week_1]	SCANFROM [_back(7)] SATISFY 1
  251 OMIT [$T] MSG %"Labor Day%"
  252 REM  Mon Oct [Week_2]	MSG %"Columbus Day%"
  253 REM      Nov 11		MSG %"Veterans Day%"
  254 
  255 REM      Oct 30		MSG %"Mischief Night%"
  256 REM      Oct 31		MSG %"Halloween%"
  257 REM  Tue Nov  2		SCANFROM [_back(7)] \
  258 	SATISFY [($Ty % 4) == 0] \
  259 	MSG %"Election%" Day
  260 REM  Thu Nov [Week_4]	SCANFROM [_back(7)] SATISFY 1
  261 OMIT [$T] MSG %"Thanksgiving%" Day
  262 REM  Fri Nov [Week_4+1]	SCANFROM [_back(7)] SATISFY 1
  263 OMIT [$T] MSG %"Thanksgiving%" (cont.)
  264 OMIT     Dec 24		MSG %"Christmas Eve%"
  265 OMIT     Dec 25		MSG %"Christmas%" Day
  266 
  267 ##########################################################################
  268 #								         #
  269 # If any US holidays were triggered above, shade in the calendar         #
  270 # entry in PostScript.  This is not quite correct, as it blots out any   #
  271 # other PostScript stuff above.  I was too lazy to do it properly :-)    #
  272 #								         #
  273 ##########################################################################
  274 if $NumTrig > SaveTrig
  275 	REM SPECIAL SHADE 220
  276 endif
  277 
  278 #PSSTUFF2
  279 ##########################################################################
  280 #									 #
  281 # Since the SHADE special blots out any previous PostScript		 #
  282 # reminders for a date, these examples need to follow the US Holidays	 #
  283 # section, which uses SHADE.                                             #
  284 #									 #
  285 ##########################################################################
  286 
  287 # The following will fill in the Hebrew dates on the calendar.  For this
  288 # example, I recommend that you use the -sd 10 option for Rem2PS.
  289 REM PS Border Border moveto \
  290    /DayFont findfont DaySize scalefont setfont \
  291    ([hebday($U)] [hebmon($U)]) show
  292 
  293 # Fill in the phases of the moon on the PostScript calendar
  294 [moondate(0)] SPECIAL MOON 0
  295 [moondate(1)] SPECIAL MOON 1
  296 [moondate(2)] SPECIAL MOON 2
  297 [moondate(3)] SPECIAL MOON 3
  298 
  299 # The following example puts sunrise and sunset times in PostScript in the
  300 # calendar - the sizes are hard-coded, however, and work best in landscape.
  301 REM PS Border Border 5 sub moveto \
  302 	/SmallFont findfont 4 scalefont setfont \
  303 	(Sunrise: [sunrise($T)] Sunset: [sunset($T)]) show
  304 
  305 # The next one puts the day number (1-366) and days left in the year at the
  306 # bottom of the post-script calendar.  Again, the hard-coded sizes work best
  307 # in landscape.
  308 FSET _DayOfYear(x) x-(date(year(x),1,1) - 1)
  309 REM PS BoxWidth 3 mul 4 div Border 5 sub moveto \
  310 	/SmallFont findfont 4 scalefont setfont \
  311 	([_DayOfYear($U)]([365+isleap($U)-_DayOfYear($U)])) show
  312 
  313 #JHOLS
  314 ##########################################################################
  315 #								         #
  316 # This portion of the file contains reminders for Jewish holidays.  The	 #
  317 # dates were obtained from "The First Jewish Catalog" by Richard Siegel	 #
  318 # and Michael and Sharon Strassfeld, published by the Jewish Publication #
  319 # Society of America.  The Reform version of the calendar was guessed	 #
  320 # at by Dianne Skoll based on experience.  There is probably no standard  #
  321 # Reform position on many of the holidays, so you may have to adjust     #
  322 # the file as required.                                                  #
  323 #									 #
  324 # Additional corrections were made from the paper "Calendrical		 #
  325 # Calculations" by Nachum Dershowitz and Edward M. Reingold.  Any	 #
  326 # further corrections are welcome.					 #
  327 #				        			         #
  328 ##########################################################################
  329 
  330 # Here are some general functions that you might find nice to use
  331 
  332 # _hstr:  Returns a string which is the full Hebrew date of its argument.
  333 #         Example: hstr('1994/02/02') returns "21 Shvat 5754"
  334 FSET _hstr(x) HEBDAY(x) + " " + HEBMON(x) + " " + HEBYEAR(x)
  335 
  336 # _hyrlen:  Return the length of the specified Hebrew year
  337 #           Example: _hyrlen(5754) returns 355
  338 FSET _hyrlen(x) HEBDATE(1, "Tishrey", x+1) - HEBDATE(1, "Tishrey", x)
  339 
  340 # --- HERE ARE THE JEWISH HOLIDAYS ---
  341 # Set the variable InIsrael to 1 if you live in Israel.  Otherwise,
  342 # you get the Diaspora versions of Jewish holidays
  343 SET InIsrael 0
  344 
  345 # Set the variable Reform to 1 if you want the Reform version of the
  346 # Jewish calendar.  Otherwise, you get the traditional version
  347 SET Reform 0
  348 
  349 # Convenient function definition to save typing
  350 FSET _h(x, y) HEBDATE(x,y)
  351 FSET _h2(x, y) HEBDATE(x, y, $U-7)
  352 FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1)
  353 FSET _PastSun(x, y) IIF(WKDAYNUM(_h2(x,y))!=0, _h2(x,y), _h2(x,y)+1)
  354 FSET _PastMon(x, y) IIF(WKDAYNUM(_h2(x,y))!=1, _h2(x,y), _h2(x,y)+1)
  355 
  356 # Default values in case InIsrael and Reform are not set
  357 SET InIsrael VALUE("InIsrael", 0)
  358 SET Reform   VALUE("Reform", 0)
  359 
  360 [_h(1,  "Tishrey")] ++4 MSG %"Rosh Hashana 1%" is %b.
  361 
  362 # No RH-2 or Tzom Gedalia in Reform
  363 IF !Reform
  364    [_h(2,  "Tishrey")] ++4 MSG %"Rosh Hashana 2%" is %b.
  365    [_PastSat(3,  "Tishrey")] ++4 MSG %"Tzom Gedalia%" is %b.
  366 ENDIF
  367 
  368 [_h(10, "Tishrey")] ++4 MSG %"Yom Kippur%" is %b.
  369 [_h(15, "Tishrey")] ++4 MSG %"Sukkot 1%" is %b.
  370 
  371 IF !InIsrael
  372    [_h(16, "Tishrey")] MSG %"Sukkot 2%"
  373 ENDIF
  374 
  375 [_h(21, "Tishrey")] ++4 MSG %"Hoshana Rabba%" is %b.
  376 [_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
  377 
  378 IF InIsrael
  379    [_h(22, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
  380 ELSE
  381    [_h(23, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
  382 ENDIF
  383 
  384 # Because Kislev can change length, we must be more careful about Chanukah
  385 FSET _chan(x) HEBDATE(24, "Kislev", $U-9)+x
  386 [_chan(1)] ++4 MSG %"Chanukah 1%" is %b.
  387 [_chan(2)] MSG %"Chanukah 2%"
  388 [_chan(3)] MSG %"Chanukah 3%"
  389 [_chan(4)] MSG %"Chanukah 4%"
  390 [_chan(5)] MSG %"Chanukah 5%"
  391 [_chan(6)] MSG %"Chanukah 6%"
  392 [_chan(7)] MSG %"Chanukah 7%"
  393 [_chan(8)] MSG %"Chanukah 8%"
  394 
  395 # Not sure about Reform's position on the next one.
  396 IF !Reform
  397 # 10 Tevet will never be a Saturday, so whether or not to
  398 # move it is moot.  (Thanks to Art Werschulz.)
  399    [_h(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
  400 ENDIF
  401 
  402 [_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
  403 [_h(14, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
  404 [_h(15, "Adar A")] ++4 MSG %"Shushan Purim Katan%" is %b.
  405 
  406 # If Purim is on Sunday, then Fast of Esther is 11 Adar.
  407 IF WKDAYNUM(_h2(13, "Adar")) != 6
  408    REM [_h2(13, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
  409 ELSE
  410    REM [_h2(11, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
  411 ENDIF
  412 [_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
  413 [_h(15, "Adar")] ++4 MSG %"Shushan Purim%" is %b.
  414 [_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
  415 
  416 IF !InIsrael
  417    [_h(16, "Nisan")] MSG %"Pesach 2%"
  418 ENDIF
  419 
  420 [_h(21, "Nisan")] MSG %"Pesach 7%"
  421 
  422 IF !InIsrael && !Reform
  423    [_h(22, "Nisan")] MSG %"Pesach 8%"
  424 ENDIF
  425 
  426 REM [_PastSun(27, "Nisan")] SATISFY 1
  427 
  428 IF $Tw == 5
  429    REM [_PastSun(26, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
  430 ELSE
  431    REM [_PastSun(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
  432 ENDIF
  433 
  434 # If 4 Iyar is a Thursday or Friday, then Yom Hazikaron is
  435 # the Wednesday before and Yom Ha'atzmaut is on
  436 # Thursday.  If 4 Iyar is a Sunday, then Yom Hazikaron
  437 # moves to 5 Iyar and Yom Ha'atzmaut to 6 Iyar.
  438 IF WKDAYNUM(_h2(4, "Iyar")) == 4 || WKDAYNUM(_h2(4, "Iyar")) == 5
  439 	[_h(2, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
  440 	[_h(3, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
  441 ELSE
  442 IF WKDAYNUM(_h2(4, "Iyar")) == 0
  443 	[_h(5, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
  444 	[_h(6, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
  445 ELSE
  446 	[_h(4, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
  447 	[_h(5, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
  448 ENDIF
  449 ENDIF
  450 
  451 # Not sure about Reform's position on Lag B'Omer
  452 IF !Reform
  453    [_h(18, "Iyar")] ++4 MSG %"Lag B'Omer%" is %b.
  454 ENDIF
  455 
  456 [_h(28, "Iyar")] ++4 MSG %"Yom Yerushalayim%" is %b.
  457 [_h(6,  "Sivan")] ++4 MSG %"Shavuot%" is %b.
  458 
  459 IF !InIsrael && !Reform
  460    [_h(7, "Sivan")] MSG %"Shavuot 2%"
  461 ENDIF
  462 
  463 # Fairly sure Reform Jews don't observe the next two
  464 IF !Reform
  465 # Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally
  466 # fall on a Saturday
  467    [_PastSat(17, "Tamuz")] ++4 MSG %"Tzom Tammuz%" is %b.
  468    [_PastSat(9,  "Av")] ++4 MSG %"Tish'a B'Av%" is %b.
  469 ENDIF
  470 
  471 # Counting the omer - do the whole spiel, i.e:
  472 # "This is the xth day of the omer, being y weeks and z days of the omer."
  473 # Nice Remind programming example here!
  474 SET ostart HEBDATE(16, "Nisan", $U-50)
  475 IF ostart <= $U && ($U - ostart < 49)
  476    SET odays $U-ostart+1
  477    IF odays < 7
  478       MSG %"%"Today is the [ORD(odays)] day of the Omer.
  479    ELSE
  480       IF !(odays % 7)
  481          MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
  482       ELSE
  483 	 MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer.
  484       ENDIF
  485    ENDIF
  486    CAL [ORD(odays)] of Omer
  487 ENDIF
  488 
  489 ### Candle lighting and Havdalah.  You should probably add candle lighting
  490 ### for other holidays besides Shabbat.  These just create calendar entries
  491 ### for Friday and Saturday.  Note:  You must set your latitude, longitude
  492 ### and possibly time zone for these to work properly!
  493 
  494 REM Friday   CAL Candle lighting at [sunset($T)-18]
  495 REM Saturday CAL Havdalah at [sunset($T)+42]
  496 
  497 #COLORS
  498 ##########################################################################
  499 #								         #
  500 # This contains sample ANSI escape sequences for coloring messages.      #
  501 # It should work on an IBM PC with the ANSI.SYS driver, and on           #
  502 # other terminals which use the ANSI sequences.                          #
  503 #								         #
  504 # This information was provided by Gail Gurman.
  505 #								         #
  506 ##########################################################################
  507 # Colors - use Nrm to reset to normal text.
  508 SET Esc   CHAR(27)
  509 
  510 SET Nrm   Esc + "[0m"
  511 SET Blk   Esc + "[0;30m"
  512 SET Red   Esc + "[0;31m"
  513 SET Grn   Esc + "[0;32m"
  514 SET Ylw   Esc + "[0;33m"
  515 SET Blu   Esc + "[0;34m"
  516 SET Mag   Esc + "[0;35m"
  517 SET Cyn   Esc + "[0;36m"
  518 SET Wht   Esc + "[0;37m"
  519 SET Gry   Esc + "[30;1m"
  520 SET BrRed Esc + "[31;1m"
  521 SET BrGrn Esc + "[32;1m"
  522 SET BrYlw Esc + "[33;1m"
  523 SET BrBlu Esc + "[34;1m"
  524 SET BrMag Esc + "[35;1m"
  525 SET BrCyn Esc + "[36;1m"
  526 SET BrWht Esc + "[37;1m"
  527 
  528 # Examples
  529 REM MSG A [Blu]blue[Nrm] reminder.
  530 REM MSG [Red]%"A red reminder%" safe to use in the calendar mode.[Nrm]
  531 
  532 # Here is an example of how to use msgprefix() and msgsuffix().  These
  533 # will highlight priority-0 reminders in bright red,
  534 # priority-2500 in red, and priority-7500 in blue.  All others
  535 # will be in the normal colors
  536 FSET msgprefix(x) iif(x==0, BrRed, x==2500, Red, x==7500, Blu, Nrm)
  537 
  538 # Don't forget to return to normal color set at the end of reminder!
  539 FSET msgsuffix(x) Nrm
  540 
  541 # The next examples are great for putting right at the end of the reminder
  542 # file.  They make queued reminders more eye-catching when they pop up.
  543 FSET msgprefix(x) char(13,10,13,10)+"******************"+char(13,10,13,10)
  544 FSET msgsuffix(x) char(13,10)+"******************"+char(13,10,13,10)