Lines Matching refs:s

119   struct randread_source *s = xmalloc (sizeof *s);  in simple_new()  local
120 s->source = source; in simple_new()
121 s->handler = randread_error; in simple_new()
122 s->handler_arg = handler_arg; in simple_new()
123 return s; in simple_new()
153 randread_free_body (struct randread_source *s) in randread_free_body() argument
155 FILE *source = s->source; in randread_free_body()
156 explicit_bzero (s, sizeof *s); in randread_free_body()
157 free (s); in randread_free_body()
180 struct randread_source *s; in randread_new() local
186 s = simple_new (source, name); in randread_new()
189 setvbuf (source, s->buf.c, _IOFBF, MIN (sizeof s->buf.c, bytes_bound)); in randread_new()
192 s->buf.isaac.buffered = 0; in randread_new()
193 if (! get_nonce (s->buf.isaac.state.m, in randread_new()
194 MIN (sizeof s->buf.isaac.state.m, bytes_bound))) in randread_new()
197 randread_free_body (s); in randread_new()
201 isaac_seed (&s->buf.isaac.state); in randread_new()
204 return s; in randread_new()
217 randread_set_handler (struct randread_source *s, void (*handler) (void const *)) in randread_set_handler() argument
219 s->handler = handler; in randread_set_handler()
223 randread_set_handler_arg (struct randread_source *s, void const *handler_arg) in randread_set_handler_arg() argument
225 s->handler_arg = handler_arg; in randread_set_handler_arg()
233 readsource (struct randread_source *s, unsigned char *p, size_t size) in readsource() argument
237 size_t inbytes = fread (p, sizeof *p, size, s->source); in readsource()
243 errno = (ferror (s->source) ? fread_errno : 0); in readsource()
244 s->handler (s->handler_arg); in readsource()
301 randread (struct randread_source *s, void *buf, size_t size) in randread() argument
303 if (s->source) in randread()
304 readsource (s, buf, size); in randread()
306 readisaac (&s->buf.isaac, buf, size); in randread()
316 randread_free (struct randread_source *s) in randread_free() argument
318 return randread_free_body (s); in randread_free()