home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
me34exe.zip
/
mutt
/
package
/
cstuff.mut
< prev
next >
Wrap
Text File
|
1995-01-14
|
1KB
|
54 lines
;; C Durland Public Domain
(const END 78) ;; column last character on line will be in
(defun
end-slide ;; move text so right part ends at col
{
(int col n x)
(n (if (arg-flag) (arg-prefix) END))
(arg-flag FALSE 1) ;; reset arg count
(delete-horizontal-space)
(col (current-column))
(end-of-line)
(x (+ 1 (- n (current-column))))
(current-column col)
(to-col (+ col x))
}
MAIN
{
(bind-to-key "end-slide" "M-`")
}
)
;;/* ******************************************************************** */
;;/* *************************** Header Text **************************** */
;;/* ******************************************************************** */
(defun
c-header-with-text
{
(int n len)
(string text)
(text (ask "Header text: "))
;(n (- 66 (/ (len (length-of text)) 2)))
(n (/ (- 66 (len (length-of text))) 2))
(insert-text
"/* ******************************************************************** */^J")
(insert-text "/* "
(extract-elements
"********************************************************************"
0 n)
" " text " "
(extract-elements
"********************************************************************"
0 n)
(if (!= len (* 2 (/ len 2))) "*" "") ;; pad odd length text
" */^J")
(insert-text
"/* ******************************************************************** */^J")
}
)