/src/open5gs/lib/asn1c/common/UTF8String_print.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. |
3 | | * All rights reserved. |
4 | | * Redistribution and modifications are permitted subject to BSD license. |
5 | | */ |
6 | | #include <asn_internal.h> |
7 | | #include <UTF8String.h> |
8 | | |
9 | | int |
10 | | UTF8String_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, |
11 | 0 | asn_app_consume_bytes_f *cb, void *app_key) { |
12 | 0 | const UTF8String_t *st = (const UTF8String_t *)sptr; |
13 | |
|
14 | 0 | (void)td; /* Unused argument */ |
15 | 0 | (void)ilevel; /* Unused argument */ |
16 | |
|
17 | 0 | if(st && st->buf) { |
18 | 0 | return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; |
19 | 0 | } else { |
20 | 0 | return (cb("<absent>", 8, app_key) < 0) ? -1 : 0; |
21 | 0 | } |
22 | 0 | } |