~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to lib/dynamic-string.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
 
2
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
3
3
 *
4
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
5
 * you may not use this file except in compliance with the License.
22
22
#include <stddef.h>
23
23
#include <stdint.h>
24
24
#include <stdio.h>
 
25
#include <time.h>
25
26
#include "compiler.h"
26
27
 
27
 
struct tm;
28
 
 
29
28
/* A "dynamic string", that is, a buffer that can be used to construct a
30
29
 * string across a series of operations that extend or modify it.
31
30
 *
56
55
void ds_put_format_valist(struct ds *, const char *, va_list)
57
56
    PRINTF_FORMAT(2, 0);
58
57
void ds_put_printable(struct ds *, const char *, size_t);
59
 
void ds_put_strftime(struct ds *, const char *, bool utc)
60
 
    STRFTIME_FORMAT(2);
61
58
void ds_put_hex_dump(struct ds *ds, const void *buf_, size_t size,
62
59
                     uintptr_t ofs, bool ascii);
63
60
int ds_get_line(struct ds *, FILE *);
64
 
int ds_get_preprocessed_line(struct ds *, FILE *);
 
61
int ds_get_preprocessed_line(struct ds *, FILE *, int *line_number);
65
62
int ds_get_test_line(struct ds *, FILE *);
66
63
 
 
64
void ds_put_strftime(struct ds *, const char *template, time_t when, bool utc)
 
65
    STRFTIME_FORMAT(2);
 
66
char *xastrftime(const char *template, time_t when, bool utc)
 
67
    STRFTIME_FORMAT(1);
 
68
 
67
69
char *ds_cstr(struct ds *);
68
70
const char *ds_cstr_ro(const struct ds *);
69
71
char *ds_steal_cstr(struct ds *);