Files
CydandClaude Fable 5 db7745fcd0 sda4: commit the Glaze developer hard-drive dump
Un-ignored: the dev drive is the ground truth the restoration and
emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer
source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio
content). Kept in-repo for the pod-owner community.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 19:41:15 -05:00

70 lines
2.8 KiB
Plaintext

/****************************************************************************
** PROJECT ** DATE **
*****************************************************************************
** FUNCTION ** INSERTS THE CURRENT DATE INTO THE BUFFER AT THE CURSOR **
*****************************************************************************
** AUTHOR ** WARREN D HUMPHREYS **
*****************************************************************************
** DATE ** THURSDAY 19TH SEPTEMBER 1991 **
*****************************************************************************
** COMMENTS ** THE LONG / SHORT OPTION DICTATES WHETHER THE DATE IS **
** ** INSERTED IN THE FORM "Thursday 19th September 1991" OR THE **
** ** MUCH SHORTER "19/09/91". **
*****************************************************************************
** MODIFICATION HISTORY **
*****************************************************************************
** DATE ** WHO ** CHANGED WHAT **
*****************************************************************************
** ** ** **
****************************************************************************/
/****************************************************************************
** FUNCTION PROTOTYPES **
****************************************************************************/
void InsertDate(void);
/****************************************************************************
** GLOBAL VARIABLES **
****************************************************************************/
/****************************************************************************
** ACTUAL FUNCTIONS **
****************************************************************************/
void InsertDate(void)
{
int Day,
Month,
Year;
string MonthString,
Reply,
Suffix,
WeekDay;
get_parm(0,Reply,"Long or short format [L|S] : ",1,"S");
date(Year,Month,Day,MonthString,WeekDay);
if ((Day>=11) && (Day<=19))
Suffix="th";
else
{
switch (Day % 10)
{
case (1) : Suffix="st";
case (2) : Suffix="nd";
case (3) : Suffix="rd";
default : Suffix="th";
}
}
if (upper(Reply)=="L")
{
insert("%s %d%s %s %d",WeekDay,Day,Suffix,MonthString,Year);
}
else
if (upper(Reply)=="S")
insert("%02d/%02d/%02d",Day,Month,Year % 100);
}