home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
wp
/
bmacs.zip
/
CCASE.M
< prev
next >
Wrap
Text File
|
1989-01-01
|
3KB
|
135 lines
;**
;** BRIEF -- Basic Reconfigurable Interactive Editing Facility
;**
;** Written by Dave Nanian and Michael Strickman.
;**
;**
;** macros : lcase_word, inq_eoln, ucase_word
;**
;**
;**
;** D. Lane 13 October 1987
;*******************************************************
;**
;** Moved key assignments to initials macro. Makes it easier to keep
;** track of reconfigured keystrokes. Used autoload to load ccase when
;** one of these macros arfe called.
;**
;** Jake Colman 2 Feb 1988
;*******************************************************
;** (macro ccase
;**
;** Key assignments
;**
;** (
;** (assign_to_key "<Alt-F7>" "ucase_word")
;** (assign_to_key "<Alt-F8>" "lcase_word")
;** )
;**)
(macro lcase_word
;**
;** converts next word to lower case
;**
(
(string ichar)
(= ichar (read 1)) ;** read character
;** skips past blanks
(while (&& (== ichar " ") (!= (inq_eoln) 1)) ;** not equal blank and not eoln
(
(move_rel 0 1)
(= ichar (read 1))
)
)
(while (&& (!= ichar " ") (!= (inq_eoln) 1)) ;** not equal blank and not eoln
(
(delete_char)
(insert (lower ichar))
(= ichar (read 1))
)
)
)
)
;**
;** BRIEF -- Basic Reconfigurable Interactive Editing Facility
;**
;** Written by Dave Nanian and Michael Strickman.
;**
;** BRIEF macro inq_eoln by DAL
;**
;** purpose : returns : 0 if * not * at end of line.
;** 1 if at end of line.
;**
;** written Sept 1987
(macro inq_eoln
(
(int cur_col)
(int end_col)
(int return_var)
(= return_var 0)
(inq_position NULL cur_col)
(end_of_line)
(inq_position NULL end_col)
(move_abs 0 cur_col)
(if (>= cur_col end_col)
(
(= return_var 1)
)
)
(returns return_var)
)
)
;**
;**
;** D. Lane 13 October 1987
(macro ucase_word
;**
;** converts next word to UPPER case
;**
(
(string ichar)
(= ichar (read 1)) ;** read character
;** skips past blanks
(while (&& (== ichar " ") (!= (inq_eoln) 1)) ;** not equal blank and not eoln
(
(move_rel 0 1)
(= ichar (read 1))
)
)
(while (&& (!= ichar " ") (!= (inq_eoln) 1)) ;** not equal blank and not eoln
(
(delete_char)
(insert (upper ichar))
(= ichar (read 1))
)
)
)
)