Commit f279a204 authored by rswindell's avatar rswindell
Browse files

Moved zonestr from misc.c to date_str.c.

Moved getfname from misc.c to dirwrap.c.
parent c04fa6c4
......@@ -280,6 +280,62 @@ when_t DLLCALL rfc822date(char* date)
return(when);
}
/****************************************************************************/
/* Converts when_t.zone into ASCII format */
/****************************************************************************/
char* DLLCALL zonestr(short zone)
{
static char str[32];
switch((ushort)zone) {
case 0: return("UTC");
case AST: return("AST");
case EST: return("EST");
case CST: return("CST");
case MST: return("MST");
case PST: return("PST");
case YST: return("YST");
case HST: return("HST");
case BST: return("BST");
case ADT: return("ADT");
case EDT: return("EDT");
case CDT: return("CDT");
case MDT: return("MDT");
case PDT: return("PDT");
case YDT: return("YDT");
case HDT: return("HDT");
case BDT: return("BDT");
case MID: return("MID");
case VAN: return("VAN");
case EDM: return("EDM");
case WIN: return("WIN");
case BOG: return("BOG");
case CAR: return("CAR");
case RIO: return("RIO");
case FER: return("FER");
case AZO: return("AZO");
case LON: return("LON");
case BER: return("BER");
case ATH: return("ATH");
case MOS: return("MOS");
case DUB: return("DUB");
case KAB: return("KAB");
case KAR: return("KAR");
case BOM: return("BOM");
case KAT: return("KAT");
case DHA: return("DHA");
case BAN: return("BAN");
case HON: return("HON");
case TOK: return("TOK");
case SYD: return("SYD");
case NOU: return("NOU");
case WEL: return("WEL");
}
sprintf(str,"%02d:%02u",zone/60,zone<0 ? (-zone)%60 : zone%60);
return(str);
}
/****************************************************************************/
/* Convert when_t structure to RFC822 date header field (string) */
/****************************************************************************/
......
......@@ -38,23 +38,6 @@
#include "sbbs.h"
#include "crc32.h"
/****************************************************************************/
/* Return the filename portion of a full pathname */
/****************************************************************************/
char* DLLCALL getfname(char* path)
{
char *fname;
fname=strrchr(path,'/');
if(fname==NULL)
fname=strrchr(path,'\\');
if(fname!=NULL)
fname++;
else
fname=path;
return(fname);
}
/****************************************************************************/
/* Network open function. Opens all files DENYALL and retries LOOP_NOPEN */
/* number of times if the attempted file is already open or denying access */
......@@ -315,63 +298,6 @@ int strsame(char *str1, char *str2)
#define MV_BUFLEN 4096
/****************************************************************************/
/* Converts when_t.zone into ASCII format */
/****************************************************************************/
char* DLLCALL zonestr(short zone)
{
static char str[32];
switch((ushort)zone) {
case 0: return("UTC");
case AST: return("AST");
case EST: return("EST");
case CST: return("CST");
case MST: return("MST");
case PST: return("PST");
case YST: return("YST");
case HST: return("HST");
case BST: return("BST");
case ADT: return("ADT");
case EDT: return("EDT");
case CDT: return("CDT");
case MDT: return("MDT");
case PDT: return("PDT");
case YDT: return("YDT");
case HDT: return("HDT");
case BDT: return("BDT");
case MID: return("MID");
case VAN: return("VAN");
case EDM: return("EDM");
case WIN: return("WIN");
case BOG: return("BOG");
case CAR: return("CAR");
case RIO: return("RIO");
case FER: return("FER");
case AZO: return("AZO");
case LON: return("LON");
case BER: return("BER");
case ATH: return("ATH");
case MOS: return("MOS");
case DUB: return("DUB");
case KAB: return("KAB");
case KAR: return("KAR");
case BOM: return("BOM");
case KAT: return("KAT");
case DHA: return("DHA");
case BAN: return("BAN");
case HON: return("HON");
case TOK: return("TOK");
case SYD: return("SYD");
case NOU: return("NOU");
case WEL: return("WEL");
}
sprintf(str,"%02d:%02u",zone/60,zone<0 ? (-zone)%60 : zone%60);
return(str);
}
/****************************************************************************/
/* Returns an ASCII string for FidoNet address 'addr' */
/****************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment