Lines Matching full:current
158 char current[MAX_REALM_LN]; in add_to_transited() local
159 char exp[MAX_REALM_LN]; /* Expanded current realm name */ in add_to_transited()
162 int clst, nlst; /* count of last character in current and next */ in add_to_transited()
200 /* read field into current */ in add_to_transited()
212 current[i++] = *otrans++; in add_to_transited()
218 current[i] = '\0'; in add_to_transited()
225 while (current[0]) { in add_to_transited()
227 /* figure out expanded form of current name */ in add_to_transited()
229 clst = strlen(current) - 1; in add_to_transited()
230 if (current[0] == ' ') { in add_to_transited()
231 strncpy(exp, current+1, sizeof(exp) - 1); in add_to_transited()
234 else if ((current[0] == '/') && (prev[0] == '/')) { in add_to_transited()
237 if (strlen(exp) + strlen(current) + 1 >= MAX_REALM_LN) { in add_to_transited()
241 strncat(exp, current, sizeof(exp) - 1 - strlen(exp)); in add_to_transited()
243 else if (current[clst] == '.') { in add_to_transited()
244 strncpy(exp, current, sizeof(exp) - 1); in add_to_transited()
253 strncpy(exp, current, sizeof(exp) - 1); in add_to_transited()
285 /* realm is a subrealm of the current realm, compress */ in add_to_transited()
287 /* current one. Note that we can not do this if the next*/ in add_to_transited()
301 current[sizeof(current) - 1] = '\0'; in add_to_transited()
302 if (strlen(current) + (pl>0?pl:-pl) + 2 >= MAX_REALM_LN) { in add_to_transited()
306 strncat(current, ",", sizeof(current) - 1 - strlen(current)); in add_to_transited()
308 strncat(current, realm, (unsigned) pl); in add_to_transited()
311 strncat(current, realm+strlen(realm)+pl, (unsigned) (-pl)); in add_to_transited()
316 /* realm to be added is a superrealm of the current realm,*/ in add_to_transited()
317 /* then the current realm can be compressed. First the */ in add_to_transited()
319 /* previous realm (if possible), and then the current */ in add_to_transited()
327 current[0] = '\0'; in add_to_transited()
329 if (strlen(current) + (pl1>0?pl1:-pl1) + 1 >= MAX_REALM_LN) { in add_to_transited()
334 strncat(current, realm, (unsigned) pl1); in add_to_transited()
337 strncat(current, realm+strlen(realm)+pl1, (unsigned) (-pl1)); in add_to_transited()
342 if (strlen(current) + 2 >= MAX_REALM_LN) { in add_to_transited()
346 strncat(current, " ", sizeof(current) - 1 - strlen(current)); in add_to_transited()
347 current[sizeof(current) - 1] = '\0'; in add_to_transited()
349 if (strlen(current) + strlen(realm) + 1 >= MAX_REALM_LN) { in add_to_transited()
353 strncat(current, realm, sizeof(current) - 1 - strlen(current)); in add_to_transited()
354 current[sizeof(current) - 1] = '\0'; in add_to_transited()
356 if (strlen(current) + (pl>0?pl:-pl) + 2 >= MAX_REALM_LN) { in add_to_transited()
360 strncat(current,",", sizeof(current) - 1 - strlen(current)); in add_to_transited()
361 current[sizeof(current) - 1] = '\0'; in add_to_transited()
363 strncat(current, exp, (unsigned) pl); in add_to_transited()
366 strncat(current, exp+strlen(exp)+pl, (unsigned)(-pl)); in add_to_transited()
377 if (strlcat(trans, current, bufsize) >= bufsize) { in add_to_transited()
385 strncpy(current, next, sizeof(current) - 1); in add_to_transited()
386 current[sizeof(current) - 1] = '\0'; in add_to_transited()