pkt-line.hon commit log --grep: accept --basic-regexp and --perl-regexp (727b6fc)
   1#ifndef PKTLINE_H
   2#define PKTLINE_H
   3
   4#include "git-compat-util.h"
   5#include "strbuf.h"
   6
   7/*
   8 * Silly packetized line writing interface
   9 */
  10void packet_flush(int fd);
  11void packet_write(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
  12void packet_buf_flush(struct strbuf *buf);
  13void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
  14
  15int packet_read_line(int fd, char *buffer, unsigned size);
  16int packet_read(int fd, char *buffer, unsigned size);
  17int packet_get_line(struct strbuf *out, char **src_buf, size_t *src_len);
  18ssize_t safe_write(int, const void *, ssize_t);
  19
  20#endif