Lines Matching refs:ptr

612 	struct n_to_m_cache *ptr;  in get_cached_n_to_m_file()  local
625 ptr = head; in get_cached_n_to_m_file()
626 while (ptr != NULL) { in get_cached_n_to_m_file()
627 if (strcmp(ptr->file, filename) == 0) in get_cached_n_to_m_file()
629 ptr = ptr->next; in get_cached_n_to_m_file()
632 if (ptr == NULL) { /* we need to cache the contents */ in get_cached_n_to_m_file()
662 ptr = (struct n_to_m_cache *)calloc(1, in get_cached_n_to_m_file()
664 if (ptr == NULL) { in get_cached_n_to_m_file()
668 ptr->size = size + 1; in get_cached_n_to_m_file()
670 ptr->cached_file = (char **)calloc(ptr->size, sizeof (char *)); in get_cached_n_to_m_file()
671 if (ptr->cached_file == NULL) { in get_cached_n_to_m_file()
672 free(ptr); in get_cached_n_to_m_file()
701 if ((ptr->cached_file[maj] = strdup(drv)) == NULL) { in get_cached_n_to_m_file()
703 free(ptr->cached_file); in get_cached_n_to_m_file()
704 free(ptr); in get_cached_n_to_m_file()
707 (void) strcpy(ptr->cached_file[maj], drv); in get_cached_n_to_m_file()
711 ptr->file = strdup(filename); in get_cached_n_to_m_file()
712 if (ptr->file == NULL) { in get_cached_n_to_m_file()
713 for (maj = 0; maj <= ptr->size; maj++) in get_cached_n_to_m_file()
714 free(ptr->cached_file[maj]); in get_cached_n_to_m_file()
715 free(ptr->cached_file); in get_cached_n_to_m_file()
716 free(ptr); in get_cached_n_to_m_file()
720 ptr->next = head; in get_cached_n_to_m_file()
721 head = ptr; in get_cached_n_to_m_file()
724 *cache = ptr->cached_file; in get_cached_n_to_m_file()
727 return (ptr->size); in get_cached_n_to_m_file()
815 char *ptr; in get_entry() local
818 ptr = prev_member; in get_entry()
821 while (isspace(*ptr)) in get_entry()
822 ptr++; in get_entry()
825 if (unquote && *ptr == '"') { in get_entry()
827 ptr++; in get_entry()
831 while (*ptr && in get_entry()
832 (*ptr != separator) && (!isspace(*ptr)) && in get_entry()
833 (!quoted || (*ptr != '"'))) { in get_entry()
834 *current_entry++ = *ptr++; in get_entry()
838 if (separator && (*ptr == separator)) in get_entry()
839 ptr++; /* skip over separator */ in get_entry()
840 if (quoted && (*ptr == '"')) in get_entry()
841 ptr++; /* skip over trailing quote */ in get_entry()
844 while (isspace(*ptr)) in get_entry()
845 ptr++; in get_entry()
847 return (ptr); in get_entry()
864 char *ptr; in get_perm_entry() local
868 ptr = prev_member; in get_perm_entry()
869 while (isspace(*ptr)) in get_perm_entry()
870 ptr++; in get_perm_entry()
872 while (*ptr) { in get_perm_entry()
874 if (*ptr == ',' && nfields > 0) { in get_perm_entry()
876 } else if (isspace(*ptr)) { in get_perm_entry()
877 *current_entry++ = *ptr++; in get_perm_entry()
878 while (isspace(*ptr)) in get_perm_entry()
879 ptr++; in get_perm_entry()
883 *current_entry++ = *ptr++; in get_perm_entry()
887 while (isspace(*ptr)) in get_perm_entry()
888 ptr++; in get_perm_entry()
889 if (*ptr == ',') { in get_perm_entry()
890 ptr++; /* skip over optional trailing comma */ in get_perm_entry()
892 while (isspace(*ptr)) in get_perm_entry()
893 ptr++; in get_perm_entry()
895 return (ptr); in get_perm_entry()