far, far, away.

Chris Hudel debate2 at watdcsu.waterloo.edu
Tue Jul 12 23:52:40 AEST 1988


Hi.

Here's what I've got so far...
 
struct array {
   char line[width];
};

....
...
 
struct array far *buf;
 
....
...
 
buf = (struct array far *) farcalloc (length,sizeof(struct array))
 
...
...
far_blank_buf (buf,depth,width) 
struct array far buf[];
int depth;
int width;
{

   int row_inx = 0;
   int col_inx = 0;
 
   for (row_inx = 0; row_inx < depth - 1; row_inx++) {
      for (col_inx = 0;col_inx < width - 1; col_inx++)
         buf[row_inx].line[col_inx] = ' ';
      buf[row_inx].line[col_inx] = EOS;
   }
}
 
....
....
Okay, the program appears to hang on the far_blank_buf() routine.  Does
anybody know why?  Is it possible to do the 'struct array far buf[]' ?
 
Any help/advice is greatly appreciated....above program uses TURBO-C.
 
thanx, 
 
/chris



More information about the Comp.lang.c mailing list