File: pointer.h

package info (click to toggle)
siridb-server 2.0.53-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,612 kB
  • sloc: ansic: 47,501; python: 6,263; sh: 254; makefile: 149
file content (23 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * pointer.h - File pointer used in combination with file handler.
 */
#ifndef SIRI_FP_H_
#define SIRI_FP_H_

typedef struct siri_fp_s siri_fp_t;

#include <stdio.h>
#include <inttypes.h>

siri_fp_t * siri_fp_new(void);
/* closes the file pointer, decrement reference counter and free if needed */
void siri_fp_decref(siri_fp_t * fp);
void siri_fp_close(siri_fp_t * fp);

struct siri_fp_s
{
    FILE * fp;
    uint8_t ref;
};

#endif  /* SIRI_FP_H_ */