Man page - detect_obj_free(3)
Packages contains this manual
apt-get install libchardet-dev
Available languages:
en koManual
detect_obj_free
μ΄ λ¦μ¬ μ© λ²
μ€ λͺ
λ° ν κ°
μ μ
μ μ
λ² κ·Έ 리 ν¬ νΈ
μ μ κΆ
μ°Έ κ³
μ΄ λ¦
chardet_obj_free - chardet_obj_init μ return value memory ν΄ μ
μ¬ μ© λ²
#include
<chardet.h>
void chardet_obj_free (DetectObj **);
μ€ λͺ
chardet_obj_free() ν¨ μ λ chardet_obj_init API μ μ ν μ¬ λ© λͺ¨ 리 κ° ν λΉ λ DetectOBJ structure μ λ© λͺ¨ 리 λ₯Ό ν΄ μ ν λ€ .
λ° ν κ°
μ μ
μ μ
#include <chardet.h>
int main (void) {
|
DetectObj *obj; |
||||||
|
if ( (obj = detect_obj_init ()) == NULL ) { |
||||||
|
fprintf (stderr, "Memory Allocation failed\n"); |
||||||
|
return CHARDET_MEM_ALLOCATED_FAIL; |
||||||
|
} |
||||||
|
switch (detect ("μ λ ν μΈ μ ", &obj)) { |
||||||
|
case CHARDET_OUT_OF_MEMORY : |
||||||
|
fprintf (stderr, "On handle processing, occured out of memory\n"); |
||||||
|
detect_obj_free (&obj); |
||||||
|
return CHARDET_OUT_OF_MEMORY; |
||||||
|
case CHARDET_NULL_OBJECT : |
||||||
|
fprintf (stderr, |
||||||
|
"2st argument of chardet() is must memory allocation " |
||||||
|
"with detect_obj_init API\n"); |
||||||
|
return CHARDET_NULL_OBJECT; |
||||||
|
} |
||||||
|
# obj-bom μ CHARDET_BOM_CHECK μ μ μ§ μ μ¬ λΆ λ‘ μ§ μ μ ν λ¨ ν μ μ μ΅ λ λ€ . |
||||||
|
printf ("encoding: %s, confidence: %f, exists bom: %d\n", obj->encoding, obj->confidence, obj->bom); |
||||||
|
detect_obj_free (&obj); |
return 0;
}
μ μ
κΉ μ κ·
λ² κ·Έ 리 ν¬ νΈ
https://github.com/Joungkyun/libchardet/issues
μ μ κΆ
Copyright (c) 2019 JoungKyun.Kim
μ΄ ν λ‘ κ·Έ λ¨ μ MPL/GPL2/LGPL2.1 μ λ° λ₯΄ λ©° , μ¬ μ© μ μ μ΄ λ ν λ¬Έ μ μ λ ν μ¬ λ³΄ μ¦ ν μ§ μ λ λ€ .
μ°Έ κ³
detect_obj_init(3)