diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:02:36 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:02:36 +0000 |
commit | 16ae3d0dba5f81e5602798b915105284033dea75 (patch) | |
tree | ce0c2bf0d7e961b1015d43d1a07269d81e7a9ce9 /buffer.h | |
parent | 90279d80f57c79ac6566051172a94a2cca9674b1 (diff) |
- itojun@cvs.openbsd.org 2001/06/26 06:32:58
[atomicio.h authfd.h authfile.h auth.h auth-options.h bufaux.h
buffer.h canohost.h channels.h cipher.h clientloop.h compat.h
compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.h
hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h
radix.h readconf.h readpass.h rsa.h]
prototype pedant. not very creative...
- () -> (void)
- no variable names
Diffstat (limited to 'buffer.h')
-rw-r--r-- | buffer.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: buffer.h,v 1.7 2000/12/19 23:17:55 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: buffer.h,v 1.8 2001/06/26 06:32:48 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef BUFFER_H | 16 | #ifndef BUFFER_H |
17 | #define BUFFER_H | 17 | #define BUFFER_H |
@@ -23,44 +23,44 @@ typedef struct { | |||
23 | u_int end; /* Offset of last byte containing data. */ | 23 | u_int end; /* Offset of last byte containing data. */ |
24 | } Buffer; | 24 | } Buffer; |
25 | /* Initializes the buffer structure. */ | 25 | /* Initializes the buffer structure. */ |
26 | void buffer_init(Buffer * buffer); | 26 | void buffer_init(Buffer *); |
27 | 27 | ||
28 | /* Frees any memory used for the buffer. */ | 28 | /* Frees any memory used for the buffer. */ |
29 | void buffer_free(Buffer * buffer); | 29 | void buffer_free(Buffer *); |
30 | 30 | ||
31 | /* Clears any data from the buffer, making it empty. This does not actually | 31 | /* Clears any data from the buffer, making it empty. This does not actually |
32 | zero the memory. */ | 32 | zero the memory. */ |
33 | void buffer_clear(Buffer * buffer); | 33 | void buffer_clear(Buffer *); |
34 | 34 | ||
35 | /* Appends data to the buffer, expanding it if necessary. */ | 35 | /* Appends data to the buffer, expanding it if necessary. */ |
36 | void buffer_append(Buffer * buffer, const char *data, u_int len); | 36 | void buffer_append(Buffer *, const char *, u_int); |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Appends space to the buffer, expanding the buffer if necessary. This does | 39 | * Appends space to the buffer, expanding the buffer if necessary. This does |
40 | * not actually copy the data into the buffer, but instead returns a pointer | 40 | * not actually copy the data into the buffer, but instead returns a pointer |
41 | * to the allocated region. | 41 | * to the allocated region. |
42 | */ | 42 | */ |
43 | void buffer_append_space(Buffer * buffer, char **datap, u_int len); | 43 | void buffer_append_space(Buffer *, char **, u_int); |
44 | 44 | ||
45 | /* Returns the number of bytes of data in the buffer. */ | 45 | /* Returns the number of bytes of data in the buffer. */ |
46 | u_int buffer_len(Buffer * buffer); | 46 | u_int buffer_len(Buffer *); |
47 | 47 | ||
48 | /* Gets data from the beginning of the buffer. */ | 48 | /* Gets data from the beginning of the buffer. */ |
49 | void buffer_get(Buffer * buffer, char *buf, u_int len); | 49 | void buffer_get(Buffer *, char *, u_int); |
50 | 50 | ||
51 | /* Consumes the given number of bytes from the beginning of the buffer. */ | 51 | /* Consumes the given number of bytes from the beginning of the buffer. */ |
52 | void buffer_consume(Buffer * buffer, u_int bytes); | 52 | void buffer_consume(Buffer *, u_int); |
53 | 53 | ||
54 | /* Consumes the given number of bytes from the end of the buffer. */ | 54 | /* Consumes the given number of bytes from the end of the buffer. */ |
55 | void buffer_consume_end(Buffer * buffer, u_int bytes); | 55 | void buffer_consume_end(Buffer *, u_int); |
56 | 56 | ||
57 | /* Returns a pointer to the first used byte in the buffer. */ | 57 | /* Returns a pointer to the first used byte in the buffer. */ |
58 | char *buffer_ptr(Buffer * buffer); | 58 | char *buffer_ptr(Buffer *); |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Dumps the contents of the buffer to stderr in hex. This intended for | 61 | * Dumps the contents of the buffer to stderr in hex. This intended for |
62 | * debugging purposes only. | 62 | * debugging purposes only. |
63 | */ | 63 | */ |
64 | void buffer_dump(Buffer * buffer); | 64 | void buffer_dump(Buffer *); |
65 | 65 | ||
66 | #endif /* BUFFER_H */ | 66 | #endif /* BUFFER_H */ |