From: Rildo P. <rpr...@ac...> - 2000-11-27 15:07:40
|
Hi Andrew, On Fri, 24 Nov 2000, Andrew Paul Cameron wrote: > There is a problem with the sort giving and sort using. > > If you look at the latest version of test08u.cob you will see that I have > used two filenames in the using statement. The compiler ignores the first > file and only generates arguments for the second file. For each file the > file descriptor and filename need to be passed to the library routines. The > sort key information only needs to be passed once as the record layout for > all the files should be identical. > > Once you have changed this please let me know what the new function > definition will look like for cob_sort_using and cob_sort_giving. Ok, changed. Now the prototype should be something like: sort_using(struct file_desc *f1, char *filename1... , struct file_desc *g1, char *sd1, ... ); where f1 stands for the first file argument to "USING..." and filename1 is the pointer the filename buffer variable. If you want to get the length of this buffer (filename1), look at f1->fname_desc. The other file arguments follows, till found a NULL pointer, where starts g1, sd1, and so on. The second "cluster" of variables is, as before, the same parameters given to the cob_release routine. best regards, Rildo ---------------------------------------------------------------- Rildo Pragana FPGA/uControllers * Linux * tcl/tk P.O. Box 721 Camaragibe PE http://members.xoom.com/rpragana Brazil 54792-990 +55-81-459-1776 |