sha1-array.c: mark a private file-scope symbol as static
[git.git] / pkt-line.h
blob8cfeb0c31c8661bf11ce78d3679a21cd030ffb75
1 #ifndef PKTLINE_H
2 #define PKTLINE_H
4 #include "git-compat-util.h"
5 #include "strbuf.h"
7 /*
8 * Silly packetized line writing interface
9 */
10 void packet_flush(int fd);
11 void packet_write(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
12 void packet_buf_flush(struct strbuf *buf);
13 void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
15 int packet_read_line(int fd, char *buffer, unsigned size);
16 int packet_read(int fd, char *buffer, unsigned size);
17 int packet_get_line(struct strbuf *out, char **src_buf, size_t *src_len);
18 ssize_t safe_write(int, const void *, ssize_t);
20 #endif