Dec 292017
 
Translate comm dirs/bbslist, export same.
File XLATE32.ZIP from The Programmer’s Corner in
Category Communications
Translate comm dirs/bbslist, export same.
File Name File Size Zip Size Zip Type
XLATE.DOC 14577 4702 deflated
XLATE.EXE 28775 14673 deflated

Download File XLATE32.ZIP Here

Contents of the XLATE.DOC file


/**/
/* XLATE - BBS Text File to Phone Directory Translate Utility
** Copyright (C) 1988, Henry C. Clark, All rights reserved.
**
** V 1.0a initial release, options h,s,n,p,b,m,d, CAR to BOYAN ( as BF )
** V 1.1a correct 9600 bps value for BOYAN
** V 2.0a add procomm 2.4.2, procomm plus, qmodem, gt-powercomm, telix
** Thanks to Kevin Carr.
** V 3.0b corrected gt-power headers, added options x, k
** V 3.1 corrected gt-power export
** Thanks to Lorca Hanns.
** V 3.2 corrected gt-power end of file handling,
** added pibterm support
**
** SEND a little MONEY to pay for an UPGRADE ! Contribute $10.
** Development costs have reached $1000 for this program.
**
** Hershel Enterprises, Inc.
** Software Mechanics
** P.O. Box 832052
** Richardson, TX 75083
*/
/**/

char *dirfile[] = { /* target phone directory filenames */
{ "BOYAN.FON" }, /* /o:b */
{ "PROCOMM.DIR" }, /* /o:p */
{ "PCPLUS.DIR" }, /* /o:+ */
{ "QMODEM.FON" }, /* /o:q */
{ "GT.DIR" }, /* /o:g */
{ "TELIX.FON" }, /* /o:t */
{ "PIBTERM.FON" }, /* /o:i */
{ 0 }
};

The Phone Files, Your Program Phone Number Directory

Supports Many Comm Programs.
In general, the contents of the phone file reflect your programs
dialing directory information. The above files above are the
default for your program.

Always Uses Default Directory Name.
XLATE always uses these file names, and they are assummed to be in
your current directory. It is an ERROR to enter a file name of these
types as a parameter for XLATE. You specify one of the file names
above using the /o:? parameter. The valid characters for the '?' are
shown above.

Renames Existing Directory File.
When XLATE is going to write to a file with one of the above names,
AND that file already EXISTS : XLATE will rename the existing file
by changing the third letter of the 'extension' part to a unique
number. For example, BOYAN.FON becomes BOYAN.FO1.

/**/

char exportfile[] = "car.bbs"; /* export default list file name */

The BBS List Files, Your Text Data Base

Supports Your Manual Changes.
The whole idea of exporting TO a bbs list text file from your program
phone directory was to support the changes you are still making
manually. The XLATE export command always has just two parameters :
xlate /o:? /x

Appends To Existing BBS List.
XLATE always writes it's export text to the file name shown above in
the current directory. It does NOT overwrite an existing text file
of that name, it adds it's export data to the end of existing data.

BBS Information Expansion.
Many comm programs can contain more information about a directory
entry than the standard BBS list can support. XLATE will write
additional data on the same line after the normal data. The
separation will be marked in the line with the characters 'XL'.
Many comm programs do NOT support the information contained in the
standard BBS list. Defaults are provided.

Expansion Data
XLATE's expanded export data is still in development. The expanded
data is NOT the type of data available on the BBS list. This data is
strongly related to your individual setup. Ideas are WELCOME on
this future enhancement.

/*
** the extended data available on export is as follows

01/24 OPUS Jacks or Better 1-805- 686-0000^*d XL SCRIPT78 P CC T

^6 ^7 ^8 ^9 ^A ^B

** Notes :
** col 28 6) additional phone number in name field
** col 49 7) XL : extended data available from export
** col 52 8) script file name
** col 61 9) protocol letter, number or blank
** col 64 A) count of calls or blank
** col 67 B) terminal emulation number or blank
*/

/**/

SYSNAMPRO hcc[] = { /* known system names, and best(?) protocol */
{ "OPUS", 'Z' },
{ "FIDO", 'Y' },
{ "TBBS", 'Y' },
{ "PC-BOARD", 'Y' },
{ "RBBS-PC", 'X' },
{ "WILDCAT!", 'Y' },
{ "CITADEL", 'X' },
{ "GT", 'Z' },
{ "DBBS", 'Y' },
{ "PHOENIX", 'Z' },
{ "UNIX", 'K' },
{ "TIHOST", 'Y' },
{ "TPROBBS", 'X' },
{ "WWIV", 'Y' },
{ "AABBS", 'X' },
{ "C-NET", 'X' },
{ "GBBS", 'X' },
{ "IVORY", 'X' },
{ "UES", 'X' },
{ "BBCS", 'X' },
{ "ASCII", 'X' },
{ "QuickBBS", 'Z' },
{ "TIpsy", 'X' },
{ "ARB", 'X' },
{ "RYBBS", 'X' },
{ "ORACOMM", 'X' },
{ "TIgger", 'X' },
{ "BBS-PC", 'X' },
{ 0, ' ' }
};

The BBS System Type

Supports BBS Host System Differences.
Much of the data you enter into your comm program is repetitive, and
can be based on the type of host system you call. Two primary
distinctions are SCRIPTS, the auto-execute command files you build,
and PREFERENCE, which types of boards you like to call.

SCRIPT Support.
If you use the /s option, AND if XLATE sees one of the above
names as the start of the complete system name, then XLATE will put
the system name into the script field of your phone file entry.
Note that popular BBS Hosts such as RCP/M are not supported because
it is impossible for MS-DOS to support a script file with a '/' in
it.

System Type In Name.
If you do NOT use the /n option, AND if XLATE sees one of the above
names as the start of the complete system name, then XLATE will
remove the system name from the complete name before it puts the
name into your phone file entry.

Default Protocol.
If XLATE sees one of the above names as the start of the complete
system name, then the default protocol ( if the comm program supports
a default protocol ) will be ASSUMMED to be that specified above
along with the list of system names.
Z is Zmodem
Y is Ymodem
K is Kermit
X is Xmodem
If your comm program supports a default protocol, but cannot support
the ASSUMMED protocol, then you must manually change it within the
comm program. If you believe that the BEST protocol for a particular
system named above is something else, or if you wish to add system
names to the above list, call MY BBS at 214-881-2627.

/**/
char *helptext[] =
{
{ " usage: XLATE [inputfile] /o:type [options]\012" },
{ newlin },
{ " /o:type - one of B P + Q G T or I\012" },
{ " utility options :\012" },
{ " /h - displays this help message\012" },
{ " /s - use system type as script name /k - use date\012" },
{ " /n - leave system type in name\012" },
{ " /p - /P:c, always set protocol to c\012" },
{ " /b - /B:n, always set speed to n : 3,1,2,4,9,a\012" },
{ " /m - /M:n, maximum speed\012" },
{ " /d - display formatted screen /x - export\012" },
{ newlin },
{ " Separate options with a space.\012" },
{ " /D, /X options require no filename, only type.\012" },
{ " Existing directory file, if any, is renamed.\012" },
{ newlin },
{ " Online Help/Questions at 124/119 MY BBS (214) 881-2627.\012" },
{ 0 }
};

XLATE Call Syntax.

Examples.
xlate car0301.bbs /o:b =boyan, removes system type from name
xlate car0301.bbs /o:b /s =boyan, removes and uses type for script
xlate car0301.bbs /o:b /n =boyan, leaves system type
xlate car0301.bbs /o:b /n /s =boyan, leaves and uses type
xlate car0301.bbs /o:+ /b:a =procomm plus, all speeds 19200
xlate car0301.bbs /o:+ /m:2 =procomm plus, don't set 9600
xlate car0301.bbs /o:g /p:O =gt-power, default protocol 'O'
xlate car0301.bbs /o:G /k =gt-power, keep date from .bbs file
xlate /o:p /d =procomm 2.4 display everything
xlate /o:p /x =procomm 2.4 export to CAR.BBS format

Transform Example.
xlate /o:q /x =qmodem export to car.bbs
xlate car.bbs /o:b /s /n /k =boyan with scripts


Error Checking of Input ( Semantic ).
XLATE pretty much validates everything you enter, and it HAS to be
valid of XLATE will generate a message, usually telling you ( by
redisplaying your input ) the part which XLATE did not understand.

Error on Input ( Logical ).
XLATE does not know what protocol letter you need to use, so it
allows you to input any character. XLATE will ignore otherwise valid
options which can not be implemented for a particular comm program.


/**/

char *impmsg[] = { /* IMPORTS */
{ " Carr/Farmer to Boyan D3 Import\012" },
{ " Carr/Farmer to Procomm 2.4 Import\012" },
{ " Carr/Farmer to Procomm + 1.0 Import\012" },
{ " Carr/Farmer to Qmodem 3.1 Import\012" },
{ " Carr/Farmer to GT-Power 1.3 Import\012" },
{ " Carr/Farmer to Telix 2.10 Import\012" },
{ " Carr/Farmer to Pibterm 4.0 Import\012" }
};

char *expmsg[] = { /* EXPORTS */
{ " Boyan D3 to Carr/Farmer Export\012" },
{ " Procomm 2.4 to Carr/Farmer Export\012" },
{ " Procomm + 1.0 to Carr/Farmer Export\012" },
{ " Qmodem 3.1 to Carr/Farmer Export\012" },
{ " GT-Power 1.3 to Carr/Farmer Export\012" },
{ " Telix 2.10 to Carr/Farmer Export\012" },
{ " Pibterm 4.0 to Carr/Farmer Export\012" }
};

/*
** Carr/Farmer BBS List, Boyan D3, Procomm, Procomm +, Qmodem,
** Gt-Powercomm, Telix and Pibterm are all Copyrighted by the
** respective authors.
*/

Communication Programs.
Nuf said. You should be using one of these. If you are NOT, send
me the specs on the programs phone directory file, or send me the
file, even. I have already received information on PC-TALK and
TURBO-COMM.

/**/

/* PROGRAM SWITCHES, MAGIC VARIABLES, AND DEFAULTS */

int swtype = -1; /* switch - output format, /o: switch, NO DEFAULT */
int swconv = 1; /* switch - CONVERT or display, /d is not default */
int swscrp = 1; /* switch - NO SCRIPT FILE USE, /s is not default */
int swname = 1; /* switch - NO SYSTEM TYPE IN NAME, /n changes this */
int swsped = -1; /* switch - SPEED to use, ( /b: ) 1200 is DEFAULT */
int swmaxs = 5; /* switch - MAX SPEED, ( /m: ) 19200 is DEFAULT */
int swdate = 0; /* switch - NO KEEP DATE, /k changes this */
int swexpo = 0; /* switch - NO EXPORT, /x changes this */
char swprot = 'Y'; /* switch - PROTOCOL, ( /p: ) Ymodem is DEFAULT */


/**/

/* TYPE CODE DECODE */

switch ( toupper ( *(argv[i]+3) ) )
{
case 'B' : swtype = 0; break; /* Boyan */
case 'P' : swtype = 1; break; /* Procomm 2.4.2 */
case '+' : swtype = 2; break; /* Procomm Plus */
case 'Q' : swtype = 3; break; /* Qmodem 3.1 */
case 'G' : swtype = 4; break; /* GT-Powercomm 1.3 */
case 'T' : swtype = 5; break; /* Telix 2.10 */
case 'I' : swtype = 6; break; /* Pibterm 4.0 */
default :
{
fputs ( " Invalid Type Code in ", stderr );
fputs ( argv[i], stderr );
help_user();
break;
}
}

Program Identifier Codes.
Is it not obvious?

/**/

/* SPEED CODE DECODE */

switch ( *(argv[i]+3) )
{
case '3' : tmp = 0; break; /* 300 bps */
case '1' : tmp = 1; break; /* 1200 bps */
case '2' : tmp = 2; break; /* 2400 bps */
case '4' : tmp = 3; break; /* 4800 bps */
case '9' : tmp = 4; break; /* 9600 bps */
case 'A' :
case 'a' : tmp = 5; break; /* 19200 bps */
default :
{
fputs ( " Invalid Speed Digit in ", stderr );
fputs ( argv[i], stderr );
help_user();
break;
}
}

Speed Code Identifiers.
Well I'm sorry, most of the comm programs use the 'first number
system'. The 'A' abortion is not that bad, is it ? Procomm +
toggles between 1200 and 19200 when you hit on the '1' key !

/**/
/*
** WARNING : gt1300 has a usage counter built into it's
** phone directory file, BE CAREFUL with unregistered copies.
** XLATE may not correctly generate the usage counters in
** the first header and first directory entry.
*/
/**/

/**/
/*
** WARNING : the carr/farmer format uses both '!' and no indication
** at all to signify 300 bps entries.
*/
/**/

/**/
/*
** WARNING : the carr/farmer format uses 'e' to signify a 7E1 format
** entry. in order that XLATE not become too position dependent, the
** checking for 'e' may include text in the comment field, when there
** is not a space ( ' ' ) between the flags area and the comment field
** in the entry.
*/
/**/


 December 29, 2017  Add comments

Leave a Reply