This isnt what im trying to do is it?
Code:
void replace(char *a)
{
int in_fd, out_fd, n_chars;
char ch[BUFFERSIZE];
while ( (n_chars = read(in_fd , buf, BUFFERSIZE)) > 0 )
(
do
{
ch = getchar();
if (ch = 'w')
(
if ((ispace(off_t lseek(int ch, off_t -1, int SEEK_CUR)) == 1 ) &&
off_t lseek(int ch, off_t 1, int SEEK_CUR)) == 'e' &&
(ispace(off_t lseek(int ch, off_t 2, int SEEK_CUR)) == 1 ))
{
}
)
if (ch = 'W')
(
if ((ispace(off_t lseek(int ch, off_t -1, int SEEK_CUR)) == 1 ) &&
off_t lseek(int ch, off_t 1, int SEEK_CUR)) == 'e' &&
(ispace(off_t lseek(int ch, off_t 2, int SEEK_CUR)) == 1 ))
{
}
)
if (ch = 'a')
(
if ((ispace(off_t lseek(int ch, off_t -1, int SEEK_CUR)) == 1 ) &&
(ispace(off_t lseek(int ch, off_t 1, int SEEK_CUR)) == 1 ))
{
}
)
if (ch = 'A')
(
if ((ispace(off_t lseek(int ch, off_t -1, int SEEK_CUR)) == 1 ) &&
(ispace(off_t lseek(int ch, off_t 1, int SEEK_CUR)) == 1 ))
{
}
)
}
while(a!=EOF)
)
if ( write( out_fd, buf, n_chars ) != n_chars )
oops("Write error to ",av[1]);
if ( close(in_fd) == -1 || close(out_fd) == -1 )
oops("Error closing files","");
}