File: iv_utils_test.cc

package info (click to toggle)
gnome-commander 1.18.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,796 kB
  • sloc: cpp: 44,531; xml: 3,929; lex: 600; sh: 80; makefile: 13
file content (26 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <glib.h>
#include <stdio.h>
#include <intviewer/gvtypes.h>
#include <intviewer/viewer-utils.h>


void test_text2hex()
{
    g_return_if_fail (buf!=NULL);

    const gchar *text = "00 0102 03 04 05 06 AA BB CC FE";
    guint len;

    guint8 *buf = text2hex (text,len);

    for (int i=0; i<len; ++i)
        printf("%02x ", buf[i]);
    printf("\n");
}


int main()
{
    test_text2hex();
    return 0;
}