/illumos-gate/usr/src/cmd/sort/ |
H A D | streams_stdio.c | 46 stream_stdio_open_for_write(stream_t *str) in stream_stdio_open_for_write() argument 48 stream_simple_file_t *SF = &(str->s_type.SF); in stream_stdio_open_for_write() 50 ASSERT(!(str->s_status & STREAM_OPEN)); in stream_stdio_open_for_write() 51 ASSERT(!(str->s_status & STREAM_OUTPUT)); in stream_stdio_open_for_write() 53 if (str->s_status & STREAM_NOTFILE) in stream_stdio_open_for_write() 56 if ((SF->s_fd = open(str->s_filename, O_CREAT | O_TRUNC | in stream_stdio_open_for_write() 61 die(EMSG_OPEN, str->s_filename); in stream_stdio_open_for_write() 64 stream_set(str, STREAM_OPEN | STREAM_OUTPUT); in stream_stdio_open_for_write() 78 stream_stdio_prime(stream_t *str) in stream_stdio_prime() argument 80 stream_buffered_file_t *BF = &(str->s_type.BF); in stream_stdio_prime() [all …]
|
H A D | streams_mmap.c | 35 stream_mmap_prime(stream_t *str) in stream_mmap_prime() argument 39 if (stream_is_primed(str)) in stream_mmap_prime() 42 stream_set(str, STREAM_PRIMED); in stream_mmap_prime() 44 if (str->s_buffer_size == 0) { in stream_mmap_prime() 45 stream_set(str, STREAM_EOS_REACHED); in stream_mmap_prime() 49 str->s_current.l_data.sp = str->s_buffer; in stream_mmap_prime() 50 str->s_type.SF.s_release_origin = str->s_buffer; in stream_mmap_prime() 51 if ((nl = (char *)memchr(str->s_buffer, '\n', str->s_buffer_size)) == in stream_mmap_prime() 53 warn(WMSG_NEWLINE_ADDED, str->s_filename); in stream_mmap_prime() 54 str->s_current.l_data_length = str->s_buffer_size; in stream_mmap_prime() [all …]
|
H A D | streams_wide.c | 48 stream_wide_prime(stream_t *str) in stream_wide_prime() argument 50 stream_buffered_file_t *BF = &(str->s_type.BF); in stream_wide_prime() 55 ASSERT(!(str->s_status & STREAM_OUTPUT)); in stream_wide_prime() 56 ASSERT(str->s_status & STREAM_OPEN); in stream_wide_prime() 58 if (str->s_status & STREAM_INSTANT && (str->s_buffer == NULL)) { in stream_wide_prime() 59 str->s_buffer = xzmap(0, WIDE_VBUF_SIZE, PROT_READ | in stream_wide_prime() 61 if (str->s_buffer == MAP_FAILED) in stream_wide_prime() 63 str->s_buffer_size = WIDE_VBUF_SIZE; in stream_wide_prime() 66 ASSERT(str->s_buffer != NULL); in stream_wide_prime() 68 if (stream_is_primed(str)) { in stream_wide_prime() [all …]
|
H A D | streams_array.c | 35 stream_array_prime(stream_t *str) in stream_array_prime() argument 37 ASSERT((str->s_status & STREAM_SOURCE_MASK) == STREAM_ARRAY); in stream_array_prime() 39 str->s_type.LA.s_cur_index = MIN(0, str->s_type.LA.s_array_size - 1); in stream_array_prime() 40 if (str->s_type.LA.s_cur_index >= 0) in stream_array_prime() 42 str->s_type.LA.s_array[str->s_type.LA.s_cur_index], in stream_array_prime() 43 &str->s_current); in stream_array_prime() 45 stream_set(str, STREAM_EOS_REACHED); in stream_array_prime() 46 stream_unset(str, STREAM_PRIMED); in stream_array_prime() 50 stream_set(str, STREAM_PRIMED); in stream_array_prime() 56 stream_array_fetch(stream_t *str) in stream_array_fetch() argument [all …]
|
H A D | streams.c | 44 stream_t *str = safe_realloc(NULL, sizeof (stream_t)); in stream_new() local 46 stream_clear(str); in stream_new() 47 stream_set(str, src); in stream_new() 49 return (str); in stream_new() 53 stream_set(stream_t *str, flag_t flags) in stream_set() argument 61 str->s_status &= ~STREAM_SOURCE_MASK; in stream_set() 62 str->s_status |= flags & STREAM_SOURCE_MASK; in stream_set() 66 str->s_element_size = 0; in stream_set() 67 str->s_ops = invalid_ops; in stream_set() 73 str->s_ops = stream_array_ops; in stream_set() [all …]
|
/illumos-gate/usr/src/boot/common/ |
H A D | interp_backslash.c | 31 backslash(char *str) in backslash() argument 45 if ((new_str = strdup(str)) == NULL) in backslash() 48 while (*str) { in backslash() 51 switch (*str) { in backslash() 54 str++; in backslash() 62 new_str[i++] = *str++; in backslash() 67 str++; in backslash() 72 str++; in backslash() 77 str++; in backslash() 82 str++; in backslash() [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | syntax.c | 40 char * str in syn_name() argument 43 syn_name (str) in syn_name() 44 char *str; in syn_name() 49 if (!str || !*str) 52 if (strlen(str) > (size_t) MAXPATHLEN) 55 for (p = str; *p; p++) 65 char * str in syn_type() argument 68 syn_type (str) in syn_type() 69 char *str; in syn_type() 74 if (!str) [all …]
|
H A D | which.c | 46 char * str in isprinter() argument 49 isprinter (str) in isprinter() 50 char *str; in isprinter() 58 str 59 && *str 60 && (path = getprinterfile(str, CONFIGFILE)) 75 char * str in isclass() argument 78 isclass (str) in isclass() 79 char *str; in isclass() 87 str [all …]
|
/illumos-gate/usr/src/lib/libnsl/rpc/ |
H A D | clnt_perror.c | 116 #define REMAINDER (ERRBUFSZ - (str - strstart)) 123 char *str = __buf(); in clnt_sperror() local 124 char *strstart = str; in clnt_sperror() 126 if (str == NULL) in clnt_sperror() 130 (void) snprintf(str, ERRBUFSZ, "%s: ", s); in clnt_sperror() 131 str += strlcat(str, clnt_sperrno(e.re_status), ERRBUFSZ); in clnt_sperror() 152 (void) snprintf(str, REMAINDER, "; %s", netdir_sperror()); in clnt_sperror() 153 str += strlen(str); in clnt_sperror() 157 (void) snprintf(str, REMAINDER, "; %s", t_errlist[e.re_terrno]); in clnt_sperror() 158 str += strlen(str); in clnt_sperror() [all …]
|
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/ |
H A D | caps | 51 # type One of bool, number, str 139 back_tab cbt bt str Back tab (P) 140 bell bel bl str Audible signal (bell) (P) 141 carriage_return cr cr str Carriage return (P*) 142 change_scroll_region csr cs str change to lines #1 through #2 (vt100) (PG) 143 clear_all_tabs tbc ct str Clear all tab stops. (P) 144 clear_screen clear cl str Clear screen (P*) 145 clr_eol el ce str Clear to end of line (P) 146 clr_eos ed cd str Clear to end of display (P*) 147 column_address hpa ch str Set cursor column (PG) [all …]
|
/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/ |
H A D | caps | 53 # type One of bool, number, str 141 back_tab cbt bt str Back tab (P) 142 bell bel bl str Audible signal (bell) (P) 143 carriage_return cr cr str Carriage return (P*) 144 change_scroll_region csr cs str change to lines #1 through #2 (vt100) (PG) 145 clear_all_tabs tbc ct str Clear all tab stops. (P) 146 clear_screen clear cl str Clear screen (P*) 147 clr_eol el ce str Clear to end of line (P) 148 clr_eos ed cd str Clear to end of display (P*) 149 column_address hpa ch str Set cursor column (PG) [all …]
|
H A D | getnstr.c | 45 (getnstr)(str, n) 46 char *str; 52 __m_trace("getnstr(%p, %d)", str, n); 55 code = wgetnstr(stdscr, str, n); 61 (mvgetnstr)(y, x, str, n) 63 char *str; variable 69 __m_trace("mvgetnstr(%d, %d, %p, %d)", y, x, str, n); 73 code = wgetnstr(stdscr, str, n); 79 (mvwgetnstr)(w, y, x, str, n) 82 char *str; variable [all …]
|
H A D | addnstr.c | 45 (addnstr)(str, n) 46 const char *str; 52 __m_trace("addnstr(%p, %d)", str, n); 55 code = waddnstr(stdscr, str, n); 61 (mvaddnstr)(y, x, str, n) 63 const char *str; variable 69 __m_trace("mvaddnstr(%d, %d, %p, %d)", y, x, str, n); 73 code = waddnstr(stdscr, str, n); 79 (mvwaddnstr)(w, y, x, str, n) 82 const char *str; variable [all …]
|
/illumos-gate/usr/src/cmd/truss/ |
H A D | procset.c | 64 const char *str; in idop_enum() local 67 case POP_DIFF: str = "POP_DIFF"; break; in idop_enum() 68 case POP_AND: str = "POP_AND"; break; in idop_enum() 69 case POP_OR: str = "POP_OR"; break; in idop_enum() 70 case POP_XOR: str = "POP_XOR"; break; in idop_enum() 73 str = (const char *)pri->code_buf; in idop_enum() 77 return (str); in idop_enum() 83 const char *str; in idtype_enum() local 86 case P_PID: str = "P_PID"; break; in idtype_enum() 87 case P_PPID: str = "P_PPID"; break; in idtype_enum() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | ev_streams.c | 36 static int copyvec(evStream *str, const struct iovec *iov, int iocnt); 37 static void consume(evStream *str, size_t bytes); 38 static void done(evContext opaqueCtx, evStream *str); 122 evStream *str = id.opaque; in evTimeRW() local 126 str->timer = timer; in evTimeRW() 127 str->flags |= EV_STR_TIMEROK; in evTimeRW() 133 evStream *str = id.opaque; in evUntimeRW() local 137 str->flags &= ~EV_STR_TIMEROK; in evUntimeRW() 197 copyvec(evStream *str, const struct iovec *iov, int iocnt) { in copyvec() argument 200 str->iovOrig = (struct iovec *)memget(sizeof(struct iovec) * iocnt); in copyvec() [all …]
|
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/funcs/ |
H A D | tst.strstr.d | 31 str = "foobarbarbazbarbop"; 34 c = str; 35 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); 38 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); 41 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); 44 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); 47 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); 50 strstr(str, "baz"), strstr(str, "zba"), 51 strstr(strstr(str, "baz"), strstr(str, "zba"))); 54 printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); [all …]
|
H A D | tst.index.d | 30 string str; member 40 command[i].str = "foobarbaz"; 44 command[i].str = "foofoofoo"; 48 command[i].str = "boofoofoo"; 52 command[i].str = "foobarbaz"; 56 command[i].str = "foobar"; 60 command[i].str = "foobar"; 64 command[i].str = ""; 68 command[i].str = "foobar"; 72 command[i].str = ""; [all …]
|
/illumos-gate/usr/src/test/util-tests/tests/awk/gnu/ |
H A D | gsubtest.awk | 2 str = "abc"; print gsub("b+", "FOO", str), str 3 str = "abc"; print gsub("x*", "X", str), str 4 str = "abc"; print gsub("b*", "X", str), str 5 str = "abc"; print gsub("c", "X", str), str 6 str = "abc"; print gsub("c+", "X", str), str 7 str = "abc"; print gsub("x*$", "X", str), str 8 str = "abc"; print gsub("b|$", "X", str), str
|
/illumos-gate/usr/src/cmd/sgs/libconv/common/ |
H A D | strproc.c | 67 conv_strproc_trim(char *str) in conv_strproc_trim() argument 72 while (conv_strproc_isspace(*str)) in conv_strproc_trim() 73 str++; in conv_strproc_trim() 76 tail = str + strlen(str); in conv_strproc_trim() 77 while ((tail > str) && conv_strproc_isspace(*(tail - 1))) in conv_strproc_trim() 81 return (str); in conv_strproc_trim() 107 conv_strproc_extract_value(char *str, size_t token_len, int flags, in conv_strproc_extract_value() argument 113 str += token_len; in conv_strproc_extract_value() 119 while (conv_strproc_isspace(*str)) in conv_strproc_extract_value() 120 str++; in conv_strproc_extract_value() [all …]
|
/illumos-gate/usr/src/cmd/tbl/ |
H A D | tm.c | 19 maknew(char *str) in maknew() argument 24 p = str; in maknew() 25 for (ba= 0; c = *str; str++) in maknew() 26 if (c == '\\' && *(str+1)== '&') in maknew() 27 ba=str; in maknew() 28 str=p; in maknew() 31 for (dpoint=0; *str; str++) in maknew() 33 if (*str=='.' && !ineqn(str,p) && in maknew() 34 (str>p && digit(*(str-1)) || in maknew() 35 digit(*(str+1)))) in maknew() [all …]
|
/illumos-gate/usr/src/uts/common/rpc/ |
H A D | clnt_perr.c | 130 char *str; in clnt_sperror() local 133 str = kmem_alloc(MAXPATHLEN, KM_SLEEP); in clnt_sperror() 134 strstart = str; in clnt_sperror() 138 (void) sprintf(str, "%s: ", s); in clnt_sperror() 139 str += strlen(str); in clnt_sperror() 141 (void) strcpy(str, clnt_sperrno(e.re_status)); in clnt_sperror() 142 str += strlen(str); in clnt_sperror() 165 (void) sprintf(str, "; %s", netdir_sperror()); in clnt_sperror() 171 (void) sprintf(str, "; %s", t_errlist[e.re_terrno]); in clnt_sperror() 173 (void) sprintf(str, "; %d", e.re_terrno); in clnt_sperror() [all …]
|
/illumos-gate/usr/src/lib/libdhcpagent/common/ |
H A D | dhcpagent_util.c | 235 static char str[1024]; in dhcp_status_reply_to_string() local 243 (void) snprintf(str, sizeof (str), DHCP_STATUS_STR, in dhcp_status_reply_to_string() 248 (void) strlcat(str, "[PRIMARY] ", sizeof (str)); in dhcp_status_reply_to_string() 251 (void) strlcat(str, "[BOOTP] ", sizeof (str)); in dhcp_status_reply_to_string() 254 (void) strlcat(str, "[FAILED] ", sizeof (str)); in dhcp_status_reply_to_string() 257 (void) strlcat(str, "[BUSY] ", sizeof (str)); in dhcp_status_reply_to_string() 260 (void) strlcat(str, "[V6] ", sizeof (str)); in dhcp_status_reply_to_string() 262 (void) strlcat(str, "\n", sizeof (str)); in dhcp_status_reply_to_string() 270 return (str); in dhcp_status_reply_to_string() 273 (void) strlcat(str, "(Began, Expires, Renew) = (", sizeof (str)); in dhcp_status_reply_to_string() [all …]
|
/illumos-gate/usr/src/common/smbsrv/ |
H A D | smb_match.c | 140 smb_match_private(const char *pat, const char *str, struct match_priv *priv) in smb_match_private() argument 160 #define ADVANCE(str) \ in smb_match_private() argument 161 if ((nbstr = smb_mbtowc(NULL, str, MTS_MB_CHAR_MAX)) < 1) \ in smb_match_private() 164 str += nbstr /* no ; */ in smb_match_private() 175 if (*str != '\0') { in smb_match_private() 176 ADVANCE(str); in smb_match_private() 187 while (*str != '\0') { in smb_match_private() 189 rc = smb_match_private(pat, str, priv); in smb_match_private() 193 ADVANCE(str); in smb_match_private() 199 if ((limit = strrchr(str, '.')) != NULL) in smb_match_private() [all …]
|
/illumos-gate/usr/src/lib/gss_mechs/mech_dh/backend/mech/ |
H A D | support.c | 50 char *str; in __dh_gss_display_status() local 84 str = dgettext(TEXT_DOMAIN, "mech_dh: Success"); in __dh_gss_display_status() 87 str = dgettext(TEXT_DOMAIN, "mech_dh: No memory"); in __dh_gss_display_status() 90 str = dgettext(TEXT_DOMAIN, in __dh_gss_display_status() 94 str = dgettext(TEXT_DOMAIN, in __dh_gss_display_status() 98 str = dgettext(TEXT_DOMAIN, "mech_dh: Bad argument"); in __dh_gss_display_status() 101 str = dgettext(TEXT_DOMAIN, "mech_dh: Cipher failure"); in __dh_gss_display_status() 104 str = dgettext(TEXT_DOMAIN, "mech_dh: Verifier failure"); in __dh_gss_display_status() 107 str = dgettext(TEXT_DOMAIN, "mech_dh: Session cipher failure"); in __dh_gss_display_status() 110 str = dgettext(TEXT_DOMAIN, "mech_dh: No secret key"); in __dh_gss_display_status() [all …]
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | cexpand.c | 60 *rmpadding(char *str, char *padbuffer, int *padding) in rmpadding() argument 74 if (str == NULL) in rmpadding() 77 while (ch = (*str++ & 0377)) in rmpadding() 80 if (*str == '<') { in rmpadding() 81 svbufptr = ++str; /* skip '<' */ in rmpadding() 85 for (; *str && isdigit(*str); str++) { in rmpadding() 86 *svbufptr++ = *str; in rmpadding() 87 *pbufptr++ = *str; in rmpadding() 92 if (*str == '.') { in rmpadding() 93 str++; in rmpadding() [all …]
|