daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct sPath_Paths_Paths_Path
  2. {
  3.   idPath_Path id_path;
  4.  char *t_path;
  5.  uint32_t u4_len;
  6. };
  7.  
  8. struct sPath_Paths_Paths
  9. {
  10.   idPath_Paths id_paths;
  11.  struct sPath_Paths_Paths_Path *as_paths;
  12.   uint32_t u4_paths;
  13. };
  14.  
  15. struct sPath_Paths
  16. {
  17.  struct sPath_Paths_Paths *as_paths;
  18.  uint32_t u4_paths;
  19.  
  20.   struct sBasic_Pack *ps_pack;
  21. };
  22.  
  23. const uint32_t cu4_sPath_Paths = sizeof(struct sPath_Paths);
  24.  
  25. #define SFENCEPATH_fromerror_paths (SFENCEPATH_fromerror+0)
  26.  
  27. struct sPath_Paths * Path_Paths_Construct(struct sPath_Paths *ps_paths, struct sBasic_Pack *ps_pack)
  28. {
  29.  //enum eSFENCE_Bool b_return=eSFENCE_Bool_False;
  30.  
  31.  if (ps_paths==NULL)
  32.   {
  33.    ps_paths=(struct sPath_Paths *)GetRAM(ps_pack, cu4_sPath_Paths);
  34.    
  35.    //b_return=eSFENCE_Bool_True;
  36.   }
  37.  if (ps_paths)
  38.  {
  39.    ps_paths->ps_pack=ps_pack;
  40.  
  41.     ps_paths->as_paths=NULL;
  42.    ps_paths->u4_paths=0;
  43.   }
  44.  return ps_paths;
  45. }
  46. void Path_Paths_Destruct(struct sPath_Paths *ps_paths, enum eSFENCE_Bool b_return)
  47. {
  48.  CHECKTHIS(ps_paths, 0, )
  49.  
  50.   {
  51.    uint32_t u4_n, u4_k;
  52.    
  53.    for (u4_n=0;u4_n<ps_paths->u4_paths;u4_n++)
  54.     {
  55.      for (u4_k=0;u4_k<ps_paths->as_paths[u4_n].u4_paths;u4_k++)
  56.       {
  57.        if (ps_paths->as_paths[u4_n].as_paths[u4_k].t_path) ReturnRAM(ps_paths->ps_pack, ps_paths->as_paths[u4_n].as_paths[u4_k].t_path);
  58.      }
  59.      
  60.      if (ps_paths->as_paths[u4_n].as_paths) ReturnRAM(ps_paths->ps_pack, ps_paths->as_paths[u4_n].as_paths);
  61.    }
  62.   }
  63.  
  64.   if (ps_paths->as_paths) ReturnRAM(ps_paths->ps_pack, ps_paths->as_paths);
  65.  
  66.   if (b_return==eSFENCE_Bool_True) ReturnRAM(ps_paths->ps_pack, ps_paths);
  67. }
RAW Paste Data
Top