File: test2.c

package info (click to toggle)
vnlog 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 952 kB
  • sloc: perl: 4,496; ansic: 727; python: 462; sh: 116; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 463 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
#include "vnlog_fields_generated2.h"

void test2(void)
{
    struct vnlog_context_t ctx;
    vnlog_init_session_ctx(&ctx);

    FILE* fp = fopen("test2.got", "w");
    if(fp == NULL) return;
    vnlog_set_output_FILE(&ctx, fp);

    vnlog_emit_legend_ctx(&ctx);

    vnlog_set_field_value_ctx__a(&ctx, -3);
    vnlog_emit_record_ctx(&ctx);

    vnlog_set_field_value_ctx__b(&ctx, -4);
    vnlog_emit_record_ctx(&ctx);

    fclose(fp);
    vnlog_free_ctx(&ctx);
}