| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
str_process.h - description |
/* |
| 3 |
------------------- |
* str_process |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - common string processing features with UTF-8 support |
| 5 |
Email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
|
/*************************************************************************** |
|
|
* * |
|
|
* This program is free software; you can redistribute it and/or modify * |
|
|
* it under the terms of the GNU General Public License as published by * |
|
|
* the Free Software Foundation; either version 2 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 8 |
|
|
| 9 |
#ifndef _STR_PROCESS_H_ |
#ifndef _STR_PROCESS_H_ |
| 10 |
#define _STR_PROCESS_H_ |
#define _STR_PROCESS_H_ |
| 11 |
|
|
| 12 |
#include <stdio.h> |
#include <stdio.h> |
| 13 |
|
|
| 14 |
extern unsigned int split_line(const char *buffer, int max_len, int *p_eol); |
#define MAX_SPLIT_FILE_LINES 65536 |
| 15 |
|
|
| 16 |
extern unsigned int split_file_lines(FILE *fin, int max_len, long *p_line_offsets, int max_line_cnt); |
extern int str_length(const char *str, int skip_ctrl_seq); |
| 17 |
|
|
| 18 |
|
extern int split_line(const char *buffer, int max_display_len, int *p_eol, int *p_display_len, int skip_ctrl_seq); |
| 19 |
|
|
| 20 |
|
// p_line_widths may be NULL. Otherwise, the widths of each line will be store into the pointed array |
| 21 |
|
extern long split_data_lines(const char *p_buf, int max_display_len, long *p_line_offsets, long line_offsets_count, |
| 22 |
|
int skip_ctrl_seq, int *p_line_widths); |
| 23 |
|
|
| 24 |
|
extern int str_filter(char *buffer, int skip_ctrl_seq); |
| 25 |
|
|
| 26 |
#endif //_STR_PROCESS_H_ |
#endif //_STR_PROCESS_H_ |