home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epm603a.zip
/
EPMSMP.ZIP
/
TAGLINE.E
< prev
next >
Wrap
Text File
|
1995-08-08
|
1KB
|
53 lines
/* Tagline.e - a routine for adding a tagline to a note or append. */
compile if not defined(SMALL) -- Being compiled separately?
tryinclude 'mycnf.e'
defmain
'tagline' arg(1)
compile endif
const
compile if not defined(my_TAGLINE_COUNTER)
my_TAGLINE_COUNTER = 'd:\doc\tagline.cnt'
compile endif
compile if not defined(my_TAGLINE_FILE)
my_TAGLINE_FILE = 'd:\doc\taglines'
compile endif
defc tagline =
getfileid startfid
'e' my_TAGLINE_FILE
if rc=sayerror('New file') then
'q'
sayerror 'Tagline file' my_TAGLINE_FILE 'does not exist.'
return
elseif rc then
sayerror 'Error' rc 'editing tagline file' my_TAGLINE_FILE '-' sayerrortext(rc)
return
endif
getfileid taglinefid
'e' my_TAGLINE_COUNTER
if rc=sayerror('New file') then
line_num = 0
elseif rc then
sayerror 'Error' rc 'editing tagline counter' my_TAGLINE_COUNTER '-' sayerrortext(rc)
return
else
getline line_num, 1
endif
line_num = line_num + 1
if line_num > taglinefid.last then
line_num = 1
endif
replaceline line_num, 1
'file /q'
activatefile taglinefid
tagline = textline(line_num)
'quit'
activatefile startfid
insertline '*EPM*' tagline, .last+1