Advertisement
pushistik

test.c

Feb 8th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #define STATUS_OK (0) /* Successfully completed. */
  2. #define STATUS_ERR_INVALID (-1) /* Bad argument value. E.g. null pointer */
  3. #define STATUS_ERR_NOMEM (-2) /* No memory to complete operation. */
  4. #define STATUS_ERR_NODATA (-3) /* No data to return/process. */
  5. #define STATUS_ERR_SINGULAR (-0x10) /* The matrix is singular (degenerative) */
  6.  
  7. typedef struct _PrQueue
  8. {
  9. void * _item;
  10. int n_priority;
  11. }PrQueue;
  12. int prQueueCreate(size_t n_capacity, PrQueue ** pp_queue)
  13. {
  14. pp_queue = (PrQueue **) malloc(n_capacity*(sizeof(PrQueue **)));
  15.  
  16. for(int i=0; i <(int) n_capacity; i++)
  17. {
  18. pp_queue[i] = (PrQueue *) malloc( sizeof(PrQueue *) );
  19. }
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement