| 142 | //**************************************************************************/ |
| 143 | EXTERN_VAR si_link pipeLastLink; |
| 144 | static BOOLEAN pipeWrite(si_link l, leftv data) |
| 145 | { |
| 146 | if(!SI_LINK_W_OPEN_P(l)) slOpen(l,SI_LINK_OPEN|SI_LINK_WRITE,NULL); |
| 147 | pipeInfo *d = (pipeInfo *)l->data; |
| 148 | FILE *outfile=d->f_write;; |
| 149 | BOOLEAN err=FALSE; |
| 150 | char *s; |
| 151 | pipeLastLink=l; |
| 152 | while (data!=NULL) |
| 153 | { |
| 154 | s = data->String(); |
| 155 | // free data ?? |
| 156 | if (s!=NULL) |
| 157 | { |
| 158 | fprintf(outfile,"%s\n",s); |
| 159 | omFree((ADDRESS)s); |
| 160 | } |
| 161 | else |
| 162 | { |
| 163 | WerrorS("cannot convert to string"); |
| 164 | err=TRUE; |
| 165 | } |
| 166 | if (pipeLastLink==NULL) return TRUE; |
| 167 | data = data->next; |
| 168 | } |
| 169 | fflush(outfile); |
| 170 | pipeLastLink=NULL; |
| 171 | return err; |
| 172 | } |
| 173 | |
| 174 | static const char* slStatusPipe(si_link l, const char* request) |
| 175 | { |