comparison PrivateQueue.c @ 44:67c7f5a0308b

Renamed VMS to PR, in new branch
author Sean Halle <seanhalle@yahoo.com>
date Fri, 08 Mar 2013 05:40:08 -0800
parents d01d48b023ca
children 1ea30ca7093c
comparison
equal deleted inserted replaced
26:09472937dd57 27:e07794f7bc4c
1 /* 1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org 2 * Copyright 2009 OpenSourceResearchInstitute.org
3 * Licensed under GNU General Public License version 2 3 * Licensed under GNU General Public License version 2
4 * 4 *
5 * NOTE: this version of SRSW correct as of April 25, 2010 5 * NOTE: this version of SRSW correct as of April 25, 2010
6 * 6 *
7 * Author: seanhalle@yahoo.com 7 * Author: seanhalle@yahoo.com
38 38
39 return retQ; 39 return retQ;
40 } 40 }
41 41
42 42
43 /*A bit tricky, 'cause have to copy in two halves, and be careful about case
44 * when insert is at top and extract at bottom..
45 */
43 void 46 void
44 enlargePrivQ( PrivQueueStruc *Q ) 47 enlargePrivQ( PrivQueueStruc *Q )
45 { int32 oldSize, newSize, topPartSize, bottPartSize; 48 { int32 oldSize, newSize, topPartSize, bottPartSize;
46 int8 *insertPos, *extractPos; 49 int8 *insertPos, *extractPos;
47 int8 *oldStartOfData, *oldEndOfData, *newStartOfData, *newEndOfData; 50 int8 *oldStartOfData, *oldEndOfData, *newStartOfData, *newEndOfData;
281 enlargePrivQ( Q ); 284 enlargePrivQ( Q );
282 } 285 }
283 } 286 }
284 287
285 288
286 void 289 /*NOTE: This free is not safe to use in wrapper lib nor app code
287 freePrivQ( PrivQueueStruc *Q ) 290 */
288 { 291 void
289 //This free is not safe to use in wrapper lib nor app code! 292 freePrivQ( PrivQueueStruc *Q )
290 PR_int__free( Q->startOfData ); 293 {
291 PR_int__free( Q ); 294 //This free is not safe to use in wrapper lib nor app code!
292 } 295 PR_int__free( Q->startOfData );
296 PR_int__free( Q );
297 }