home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 25
/
CD_ASCQ_25_1095.iso
/
dos
/
tools
/
auror21a
/
cfgldlm.aml
< prev
next >
Wrap
Text File
|
1995-08-31
|
2KB
|
73 lines
/* ------------------------------------------------------------------ */
/* Macro: CFGLDLM.AML */
/* Written by: nuText Systems */
/* */
/* Description: This macro displays a configuration dialog box for */
/* line delimiter options. */
/* ------------------------------------------------------------------ */
include bootpath "define.aml"
var linedlm
var binlen
var trunclen
var delimwin
// change edit field from groupbox
function changedlm
dlm = case getrow
when 1 "0D0A"
when 2 "0D"
when 3 "0A"
otherwise ''
end
if dlm then
buf = getwinbuf delimwin
oldbuffer = gotobuf delimwin
col 1
delchar 16000
instext dlm
gotobuf oldbuffer
else
currwin delimwin
col getlinelen + 1
end
end
lineopt = case _LineDlm
when "0D0A" 'c'
when "0D" 'r'
when "0A" 'l'
otherwise 'o'
end
// create dialog box
dialog "Line Delimiter Options" 41 12 "cp"
// display delimiter options
groupbox 'Line Delimiter:' 3 2
(menu ''
item " ( ) &CR/LF (DOS)"
item " ( ) C&R Only (MAC)"
item " ( ) &LF Only (UNIX) "
item " ( ) &Other"
end) '' lineopt "crlo"
whenselect "changedlm"
delimwin = field "&Delimiter in hex: >" 3 8 6 _LineDlm
field "&Binary Line Length: >" 3 10 6 _BinaryLength
field "&Truncation Length: >" 3 11 6 _TruncLength
// ok/cancel buttons
button "O&k" 31 3 8
button "Cancel" 31 5 8
// display dialog box
if (getdialog ref lineopt ref linedlm ref binlen ref trunclen ) == 'Ok' then
setobj LineDlm linedlm 'prf'
setobj BinaryLength binlen 'prf'
setobj TruncLength trunclen 'prf'
end