IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3813 for trunk/pois/NOTES


Ignore:
Timestamp:
Apr 29, 2005, 10:53:49 AM (21 years ago)
Author:
rhl
Message:

Make poisRejectStamps return a list of rejected stamps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pois/NOTES

    r3792 r3813  
    103103
    104104The file src/libpois.a has to exist
     105
     106-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     107
     108psArray* psArrayAlloc(psU32 nalloc)
     109
     110fails to initialise the array to NULLs (not specified in the SDRS)
     111
     112-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     113
     114"bool psListAdd(psList *list, int location, void *data);
     115
     116the first function, psListAdd, adds an entry to the list and returns a
     117boolean giving the success or failure of the operation."
     118
     119(SDRS).  It'd be better to define
     120
     121psList *psListAdd(psList *list, int location, void *data);
     122and to make
     123    psListAdd(NULL, location, data);
     124equivalent to
     125    psListAlloc(data);
     126
     127That makes the code to append to a list simpler; instead of
     128
     129     list = NULL;
     130     while(foo) {
     131        ...
     132        foo = psFooAlloc();
     133        if(list == NULL) {
     134           list = psListAlloc(foo);
     135        } else {
     136           bool ok = psListAdd(list, PS_LIST_TAIL, foo);
     137           assert(ok);
     138        }
     139        psFree(foo);
     140     }
     141
     142I can simply write:
     143
     144     list = NULL;
     145     while(foo) {
     146        ...
     147        foo = psFooAlloc();
     148        psListAdd(list, PS_LIST_TAIL, foo);
     149        psFree(foo);
     150     }
     151
     152-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     153
Note: See TracChangeset for help on using the changeset viewer.