| /openbsd-src/sys/lib/libsa/ |
| H A D | snprintf.c | 45 static char *sbuf, *sbuf_end; variable 50 if (sbuf < sbuf_end) in sputchar() 51 *sbuf = c; in sputchar() 52 sbuf++; in sputchar() 60 sbuf = buf; in snprintf() 61 sbuf_end = sbuf + len; in snprintf() 66 if (sbuf < sbuf_end) in snprintf() 67 *sbuf = '\0'; in snprintf() 71 return sbuf - buf; in snprintf()
|
| /openbsd-src/sys/dev/pci/drm/ |
| H A D | drm_format_helper.c | 48 void (*xfrm_line)(void *dbuf, const void *sbuf, unsigned int npixels)) in __drm_fb_xfrm() argument 55 const void *sbuf; in __drm_fb_xfrm() local 74 sbuf = memcpy(stmp, vaddr, sbuf_len); in __drm_fb_xfrm() 76 sbuf = vaddr; in __drm_fb_xfrm() 77 xfrm_line(dst, sbuf, linepixels); in __drm_fb_xfrm() 91 void (*xfrm_line)(void *dbuf, const void *sbuf, unsigned int npixels)) in __drm_fb_xfrm_toio() argument 100 const void *sbuf; in __drm_fb_xfrm_toio() local 118 sbuf = memcpy(stmp, vaddr, sbuf_len); in __drm_fb_xfrm_toio() 120 sbuf = vaddr; in __drm_fb_xfrm_toio() 121 xfrm_line(dbuf, sbuf, linepixels); in __drm_fb_xfrm_toio() [all …]
|
| /openbsd-src/games/phantasia/ |
| H A D | gamesupport.c | 556 struct scoreboard sbuf; /* for reading entries */ in scorelist() local 560 while (fread(&sbuf, SZ_SCORESTRUCT, 1, fp) == 1) in scorelist() 562 sbuf.sb_name, sbuf.sb_login, sbuf.sb_level, sbuf.sb_type); in scorelist() 688 struct scoreboard sbuf; /* buffer to read in scoreboard entries */ in enterscore() local 694 while (fread(&sbuf, SZ_SCORESTRUCT, 1, fp) == 1) in enterscore() 695 if (strcmp(Player.p_login, sbuf.sb_login) == 0) { in enterscore() 710 if ((!found) || Player.p_level > sbuf.sb_level) in enterscore() 713 strlcpy(sbuf.sb_login, Player.p_login, in enterscore() 714 sizeof sbuf.sb_login); in enterscore() 715 strlcpy(sbuf.sb_name, Player.p_name, in enterscore() [all …]
|
| /openbsd-src/games/sail/ |
| H A D | lo_main.c | 56 char sbuf[20+LOGIN_NAME_MAX]; in lo_main() local 79 (void) snprintf(sbuf, sizeof sbuf, "%10.10s (%s)", in lo_main() 82 (void) snprintf(sbuf, sizeof sbuf, "%20.20s", log.l_name); in lo_main() 85 title[n++], sbuf, ship->shipname, log.l_netpoints, in lo_main()
|
| /openbsd-src/sys/dev/pci/ |
| H A D | if_ipw.c | 339 struct ipw_soft_buf *sbuf; in ipw_dma_alloc() local 479 sbuf = &sc->tx_sbuf_list[i]; in ipw_dma_alloc() 481 MCLBYTES, 0, BUS_DMA_NOWAIT, &sbuf->map); in ipw_dma_alloc() 487 SLIST_INSERT_HEAD(&sc->free_sbuf, sbuf, next); in ipw_dma_alloc() 504 sbuf = &sc->rx_sbuf_list[i]; in ipw_dma_alloc() 507 MGETHDR(sbuf->m, M_DONTWAIT, MT_DATA); in ipw_dma_alloc() 508 if (sbuf->m == NULL) { in ipw_dma_alloc() 514 MCLGET(sbuf->m, M_DONTWAIT); in ipw_dma_alloc() 515 if (!(sbuf->m->m_flags & M_EXT)) { in ipw_dma_alloc() 516 m_freem(sbuf->m); in ipw_dma_alloc() [all …]
|
| /openbsd-src/usr.bin/calendar/ |
| H A D | calendar.c | 153 struct stat sbuf; in main() local 176 if (stat(calendarFile, &sbuf) != 0) { in main() 183 if (stat(calendarNoMail, &sbuf) == 0 || in main() 184 stat(calendarFile, &sbuf) != 0) in main() 201 stat(calendarFile, &sbuf) != 0 || in main() 203 stat(calendarNoMail, &sbuf) == 0 || in main() 204 stat(calendarFile, &sbuf) != 0) in main()
|
| /openbsd-src/usr.sbin/radiusd/ |
| H A D | util.c | 84 char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; in addrport_tostring() local 87 if (getnameinfo(sa, salen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), in addrport_tostring() 93 ret = snprintf(buf, lbuf, "[%s]:%s", hbuf, sbuf); in addrport_tostring() 97 ret = snprintf(buf, lbuf, "%s:%s", hbuf, sbuf); in addrport_tostring()
|
| /openbsd-src/usr.sbin/kvm_mkdb/ |
| H A D | nlist.c | 69 Elf_Sym sbuf; in __elf_knlist() local 173 if (fread((char *)&sbuf, sizeof(sbuf), 1, fp) != 1) { in __elf_knlist() 181 if (!sbuf.st_name) in __elf_knlist() 184 nbuf.n_value = sbuf.st_value; in __elf_knlist() 187 switch(ELF_ST_TYPE(sbuf.st_info)) { in __elf_knlist() 189 switch (sbuf.st_shndx) { in __elf_knlist() 214 if (ELF_ST_BIND(sbuf.st_info) == STB_LOCAL) in __elf_knlist() 218 strlcpy(buf + 1, strtab + sbuf.st_name, sizeof buf - 1); in __elf_knlist()
|
| /openbsd-src/usr.bin/which/ |
| H A D | which.c | 99 struct stat sbuf; in findprog() local 104 if ((stat(prog, &sbuf) == 0) && S_ISREG(sbuf.st_mode) && in findprog() 132 if ((stat(filename, &sbuf) == 0) && S_ISREG(sbuf.st_mode) && in findprog()
|
| /openbsd-src/usr.bin/rdist/ |
| H A D | common.c | 674 char sbuf[BUFSIZ], buf[BUFSIZ]; in runcommand() local 698 s = sbuf; in runcommand() 705 if (s < (char *) &sbuf[sizeof(sbuf)-1]) in runcommand() 712 if (s == &sbuf[2]) { in runcommand() 717 (void) xwrite(rem_w, sbuf, s - sbuf); in runcommand() 720 message(MT_INFO, "%s", sbuf+1); in runcommand() 722 s = &sbuf[1]; in runcommand() 725 if (s > (char *) &sbuf[1]) { in runcommand() 728 (void) xwrite(rem_w, sbuf, s - sbuf); in runcommand() 731 message(MT_INFO, "%s", sbuf+1); in runcommand()
|
| /openbsd-src/bin/ed/ |
| H A D | io.c | 73 static char *sbuf; /* file i/o buffer */ variable 92 if (put_sbuf_line(sbuf) == NULL) { in read_stream() 130 REALLOC(sbuf, sbufsz, i + 1, ERR); in get_stream_line() 131 if (!(sbuf[i++] = c)) in get_stream_line() 134 REALLOC(sbuf, sbufsz, i + 2, ERR); in get_stream_line() 136 sbuf[i++] = c; in get_stream_line() 142 sbuf[i++] = '\n'; in get_stream_line() 145 sbuf[i] = '\0'; in get_stream_line()
|
| /openbsd-src/usr.bin/dig/lib/dns/rdata/generic/ |
| H A D | loc_29.c | 39 char sbuf[sizeof("90000000m")]; in totext_loc() local 61 snprintf(sbuf, sizeof(sbuf), in totext_loc() 64 snprintf(sbuf, sizeof(sbuf), in totext_loc() 138 sbuf, hbuf, vbuf); in totext_loc()
|
| /openbsd-src/usr.sbin/npppd/common/ |
| H A D | net_utils.c | 145 char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; in addrport_tostring() local 147 if (getnameinfo(sa, salen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), in addrport_tostring() 156 strlcat(buf, sbuf, lbuf); in addrport_tostring() 161 strlcat(buf, sbuf, lbuf); in addrport_tostring()
|
| /openbsd-src/usr.bin/nm/ |
| H A D | elf.c | 428 Elf_Sym sbuf; in elf_symloadx() local 459 *pnrawnames = symsize / sizeof(sbuf); in elf_symloadx() 477 for (np = *pnames; symsize > 0; symsize -= sizeof(sbuf)) { in elf_symloadx() 478 if (fread(&sbuf, 1, sizeof(sbuf), in elf_symloadx() 479 fp) != sizeof(sbuf)) { in elf_symloadx() 491 elf_fix_sym(eh, &sbuf); in elf_symloadx() 493 if (!sbuf.st_name || in elf_symloadx() 494 sbuf.st_name > *pstabsize) in elf_symloadx() 497 elf2nlist(&sbuf, eh, shdr, shstr, np); in elf_symloadx() 498 np->nl.n_value = sbuf.st_value; in elf_symloadx() [all …]
|
| /openbsd-src/gnu/lib/libstdc++/libstdc++/testsuite/ext/ |
| H A D | stdio_filebuf_2.cc | 42 stdio_filebuf<char> sbuf(file, ios_base::out, 1); in test01() local 43 sbuf.sputc('T'); in test01() 44 sbuf.sputc('S'); in test01()
|
| /openbsd-src/lib/libkeynote/ |
| H A D | signature.c | 791 unsigned char res2[LARGEST_HASH_SIZE], *sbuf = NULL; in keynote_sign_assertion() local 869 sbuf = calloc(DSA_size(dsa), sizeof(unsigned char)); in keynote_sign_assertion() 870 if (sbuf == NULL) in keynote_sign_assertion() 876 if (DSA_sign(0, res2, hashlen, sbuf, &slen, dsa) <= 0) in keynote_sign_assertion() 878 free(sbuf); in keynote_sign_assertion() 891 sbuf = calloc(RSA_size(rsa), sizeof(unsigned char)); in keynote_sign_assertion() 892 if (sbuf == NULL) in keynote_sign_assertion() 899 sbuf, &slen, rsa) <= 0) in keynote_sign_assertion() 901 free(sbuf); in keynote_sign_assertion() 933 sbuf = calloc(RSA_size(rsa), sizeof(char)); in keynote_sign_assertion() [all …]
|
| /openbsd-src/gnu/llvm/lldb/packages/Python/lldbsuite/test/ |
| H A D | lldbtest.py | 541 with recording(self, self.TraceOn()) as sbuf: 542 print(*args, file=sbuf, **kwargs) 963 with recording(self, traceAlways) as sbuf: 967 file=sbuf) 977 with recording(self, traceAlways) as sbuf: 978 print("tearing down the child process....", file=sbuf) 1006 with recording(self, traceAlways) as sbuf: 1010 file=sbuf) 1051 with recording(self, False) as sbuf: 1054 print("ERROR", file=sbuf) [all …]
|
| /openbsd-src/games/hangman/ |
| H A D | setup.c | 48 static struct stat sbuf; in setup() local 79 fstat(fileno(Dict), &sbuf); in setup() 80 Dict_size = sbuf.st_size; in setup()
|
| /openbsd-src/usr.sbin/unbound/dnstap/ |
| H A D | dnstap.c | 70 ProtobufCBufferSimple sbuf; in dt_pack() local 72 memset(&sbuf, 0, sizeof(sbuf)); in dt_pack() 73 sbuf.base.append = protobuf_c_buffer_simple_append; in dt_pack() 74 sbuf.len = 0; in dt_pack() 75 sbuf.alloced = DNSTAP_INITIAL_BUF_SIZE; in dt_pack() 76 sbuf.data = malloc(sbuf.alloced); in dt_pack() 77 if (sbuf.data == NULL) in dt_pack() 79 sbuf in dt_pack() [all...] |
| /openbsd-src/lib/libc/net/ |
| H A D | ruserok.c | 87 struct stat sbuf; in iruserok_sa() local 134 if (lstat(pbuf, &sbuf) == -1) in iruserok_sa() 136 else if (!S_ISREG(sbuf.st_mode)) in iruserok_sa() 138 else if (fstat(fileno(hostf), &sbuf) == -1) in iruserok_sa() 140 else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid) in iruserok_sa() 142 else if (sbuf.st_mode & (S_IWGRP|S_IWOTH)) in iruserok_sa()
|
| /openbsd-src/gnu/lib/libstdc++/libstdc++/testsuite/27_io/istream_extractor_arith/ |
| H A D | 03.cc | 48 std::stringbuf sbuf; in test03() local 49 std::istream istr(&sbuf); in test03() 50 std::ostream ostr(&sbuf); in test03()
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/ |
| H A D | gmon.c | 64 static char *sbuf; variable 117 sbuf = buffer; 164 fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz ); in _mcleanup() 166 write( fd , sbuf , ssiz ); in _mcleanup() 317 profil(sbuf + sizeof(struct phdr), ssiz - sizeof(struct phdr),
|
| /openbsd-src/gnu/gcc/gcc/config/i386/ |
| H A D | gmon-sol2.c | 113 static char *sbuf; variable 167 sbuf = buffer; in monstartup() 215 fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz ); in _mcleanup() 218 write( fd , sbuf , ssiz ); in _mcleanup() 390 profil((unsigned short *)(sbuf + sizeof(struct phdr)), in moncontrol()
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/tests/ |
| H A D | sanitizer_libc_test.cpp | 236 void test_internal_strlcpy(char *dbuf, const char *sbuf) { in test_internal_strlcpy() argument 238 retval = internal_strlcpy(dbuf, sbuf, kStrlcpyBufSize); in test_internal_strlcpy() 239 EXPECT_EQ(internal_strncmp(dbuf, sbuf, kStrlcpyBufSize - 1), 0); in test_internal_strlcpy() 241 std::min(internal_strlen(sbuf), (uptr)(kStrlcpyBufSize - 1))); in test_internal_strlcpy() 242 EXPECT_EQ(retval, internal_strlen(sbuf)); in test_internal_strlcpy() 246 if (internal_strlen(sbuf) > maxlen) { in test_internal_strlcpy() 247 retval = internal_strlcpy(dbuf, sbuf, maxlen); in test_internal_strlcpy() 248 EXPECT_EQ(internal_strncmp(dbuf, sbuf, maxlen - 1), 0); in test_internal_strlcpy()
|
| /openbsd-src/lib/libc/gen/ |
| H A D | fstab.c | 184 struct stat sbuf; in setfsent() local 191 if (stat(_PATH_FSTAB, &sbuf) != 0) in setfsent() 193 if ((sbuf.st_size == 0) || ((sbuf.st_mode & S_IFMT) != S_IFREG)) { in setfsent()
|