PROG---
//---------END
1
return
0
exit
FILE"
CLOSING
"\nERROR
printf
==EOF
fh
fclose
if
prbuf
argv[4][0]
cbuf
fh
getbuf
word[0]
if
0
exit
=='q'
getch
if
rows=0
rows==23
if
rows++
prbuf
wcount=0
argv[4][0]
cbuf
fh
q=getbuf
q
while
rows=0
int
clrscr
q=1
int
buf[rr-lr]='\n'
0
exit
FILE"
OPENING
ERROR
"\n
printf
==NULL
"r"
argv[1]
fh=fopen
if
0
exit
RANGES"
"\nERROR
printf
lr<0||lr>77||rr<1||rr>77||lr>=rr
if
argv[3]
rr=conv
argv[2]
lr=conv
0
exit
\n"
ERROR
LINE
COMMAND
"\n
printf
=5
argc
if
*fh
FILE
**argv
char
argc
int
main
int
BUF
//---CONVERT
break
default:
break
doublepos
'd':
case
break
centrepos
'c':
case
break
rightpos
'r':
case
break
leftpos
'l':
case
h
switch
h
char
cbuf
void
BUF-------
//--------PRINT
'-'
putch
buf[i]
putch
i++
i<rr-lr
i=0
for
'-'
putch
i++
i<lr
i=0
for
"\n"
printf
i
int
prbuf
void
pos---
//---double
'
buf[i]='
i++
i<=j+scs
i++
for
i--
buf[i+scs]=buf[i]
i>j
while
scs=rr-lr-1-i
i+scs>rr-lr-1
if
i--
'
buf[i]=='
while
i=rr-lr-1
int
scs
int
j
int
spins
void
wsc
i
spins
else
j+=scs+1
wsc-=scs
scs
j
spins
scount--
scount>0&&wsc>0
while
=0
wsc%scount
scs=wsc/scount+
scount>0
if
j=i
scount=j-i-1
j++
buf[j]
letter
while
scs
scount
j=i
int
wsc
int
i
int
spsins
void
wcount=0
sc-=wsc
wsc
i
spsins
wcount--
i++
buf[i]
letter
while
i++
buf[i]
letter
while
wcount>0&&sc>0
while
i=0
=0
sc%wcount
wsc=sc/wcount+
wcount>0
if
wcount--
sc=rr-lr-i
i--
'
buf[i]=='
while
i=rr-lr-1
leftpos
i
wsc=0
sc=0
int
doublepos
void
int
int
spins
void
int
int
spsins
void
//---centerpos
j++
'
buf[j]='
j<rr-lr
while
j++
k++
buf[j]=sb[k]
sb[k]
while
j++
'
buf[j]='
j<n/2
while
k=0
sb[k]=NULL
j=0
k++
j++
sb[k]=buf[j]
i>=j
while
n+=j
j++
&&j<i
'
buf[j]=='
while
n=rr-lr-i
i=bufcount
sb[81]
char
k=0
n
j=0
i
int
centrepos
void
POS
//-----RIGHT
j--
'
buf[j]='
j>=0
while
i--
j--
buf[j]=buf[i]
i>=0
while
+1
i=bufcount
j=rr-lr
i
int
rightpos
void
//-------leftpos--
k++
'
buf[k]='
k<=i
while
j++
k++
buf[k]=buf[j]
j<=i
while
j++
'
buf[j]=='
while
i=bufcount
k=0
j=0
i=0
int
leftpos
void
COUNT
//-----SPACE
i
return
i--
&&i
'
buf[i]=='
while
i=rr-lr-1
int
bufcount
int
//---------CONV---------
v
return
0
exit
error"
"\nnumber
printf
str[ss-1-i]>'9'||str[ss-1-i]<'0'
if
*o
str[ss-1-i]-'0'
v+=
o*=10
i++
i<ss
o=1
i=0
for
o
j
str
ss=strlen
v=0
i
int
*str
char
conv
int
BUF------
//--------GET
fh
feof
return
buf[i]=NULL
i++
'
buf[i]='
i<rr-lr
while
bl=rr-lr-i
1
j-ss
fh
fseek
f==2
if
fh
feof
f&&
while
sym[0]=NULL
word[0]=NULL
buf[i]=sym[j]
i++
j++
&&sym[j]
i<rr-lr
j=0
for
i++
j++
buf[i]=word[j]
word[j]
while
j=0
wcount++
word[0]
if
=1
f
if
sym[j]=NULL
f=3
=1&&sym[j]=='\n'
f
if
j++
='\n'
sym[j]&&sym[j]
while
j=0
i+sw+ss>=rr-lr
&&
f
f+=2*
i+sw>=rr-lr
f=
0
exit
range"
ws
ERROR
"\n
printf
sw>=rr-lr
if
word
sw=strlen
sym
ss=strlen
fh
gword
sym[0]
word[0]&&
if
do
ss
sw
f=0
j=0
i=0
int
*fh
FILE
getbuf
int
-----------
word
get
//
fh
feof
return
1
-1
fh
fseek
='\n'
&&x
fh
feof
if
sym[i]=NULL
i++
sym[i]='\n'
x=='\n'
if
fh
x=fgetc
i++
sym[i]=x
'
x='
x==9
if
='\n'
&&x
x
&&letter
fh
feof
while
i=0
word[i]=NULL
fh
x=fgetc
i++
word[i]=x
x
letter
&&
fh
feof
while
fh
x=fgetc
i=0
int
x
char
*fh
FILE
gword
int
----------------------
leter
//
q
return
i++
l[i]==x
q+=
=NULL
l[i]
while
i=0
q=0
int
x
char
letter
int
buf[90]
sym[300]
word[300]
char
wcount
bl
rr
lr
int
\n\t"
"
l[]=
char
h>
#include<string
h>
#include<process
h>
#include<alloc
h>
#include<conio
h>
#include<stdio

