(file) Return to Strlcat.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Strlcat.h between version 1.2 and 1.3

version 1.2, 2007/05/25 18:35:07 version 1.3, 2007/06/08 17:56:04
Line 65 
Line 65 
     /* If no-null terminator found, return size. */     /* If no-null terminator found, return size. */
  
     if (i == size)     if (i == size)
         return size;      {
           int j = 0;
           while (src[j])
           {
               j++;
           }
           return size + j;
       }
  
     /* Copy src characters to dest. */     /* Copy src characters to dest. */
  
     for (j = 0; src[j] && i + 1 < size; i++, j++)     for (j = 0; src[j] && i + 1 < size; i++, j++)
         dest[i] = src[j];         dest[i] = src[j];
  
     /* Null terminate size non-zero. */      /* Null terminate the destination.  We are guaranteed that size is
        * non-zero, because the (i == size) condition above is always true
        * when size is zero.
        */
  
     if (size > 0)  
         dest[i] = '\0';         dest[i] = '\0';
  
     while (src[j])     while (src[j])


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2