-
Notifications
You must be signed in to change notification settings - Fork 1
/
vfuuti.h
63 lines (47 loc) · 2.38 KB
/
vfuuti.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/****************************************************************************
#
# Copyright (c) 1996-2023 Vladi Belperchinov-Shabanski "Cade"
# https://cade.noxrun.com/ <cade@noxrun.com> <cade@bis.bg>
# https://cade.noxrun.com/projects/vfu https://github.com/cade-vs/vfu
#
# SEE `README',`LICENSE' OR `COPYING' FILE FOR LICENSE AND OTHER DETAILS!
#
****************************************************************************/
#ifndef _VFUUTI_H_
#define _VFUUTI_H_
#include "vfu.h"
/*###########################################################################*/
fsize_t file_st_size( struct stat* st );
VString vfu_readlink( const char* fname );
/*###########################################################################*/
int vfu_update_shell_line( VString &a_line, VString &a_options );
int vfu_break_op(); /* return != 0 if ESC pressed, non blocking */
wchar_t vfu_ask( const wchar_t *prompt, const wchar_t *allowed ); /* blocking */
/* used before copy/move to calc estimated size */
fsize_t vfu_update_sel_size( int one );
VString& vfu_expand_mask( VString& mask );
char* time_str_compact( const time_t tim, char* buf );
void vfu_beep();
VString size_str_compact( const fsize_t siz );
char* vfu_str_comma( char* target );
VString& vfu_str_comma( VString& target );
VString vfu_str_comma( fsize_t size );
/*###########################################################################*/
void vfu_hist_add( int hist_id, const char* str );
const char* vfu_hist_get( int hist_id, int index = 0 );
char* vfu_hist_get( int hist_id, int index, char* str );
int vfu_hist_index( int hist_id, const char* value );
int vfu_hist_count( int hist_id );
void vfu_hist_remove( int hist_id, int index );
int vfu_hist_menu( int x, int y, const wchar_t* title, int hist_id );
void vfu_get_str_history( int key, VString &s, int &pos ); /* internal! */
int vfu_get_str( const char *prompt, VString& target, int hist_id, int x = -1, int y = -1 );
const char* vfu_temp();
const char* vfu_temp_dir();
/*###########################################################################*/
void vfu_con_out( int x, int y, const char *s );
void vfu_con_out( int x, int y, const char *s, int attr );
void vfu_con_out( int x, int y, const wchar_t *s );
void vfu_con_out( int x, int y, const wchar_t *s, int attr );
/*###########################################################################*/
#endif//_VFUUTI_H_