39
39
40
40
/*** file scope type declarations ****************************************************************/
41
41
42
+ /*** forward declarations (file scope functions) *************************************************/
43
+
42
44
/*** file scope variables ************************************************************************/
43
45
46
+ /* --------------------------------------------------------------------------------------------- */
44
47
/*** file scope functions ************************************************************************/
45
-
46
48
/* --------------------------------------------------------------------------------------------- */
47
49
48
50
/*inline functions */
@@ -55,12 +57,16 @@ mc_fhl_is_file (const file_entry_t * fe)
55
57
return S_ISREG (fe -> st .st_mode );
56
58
}
57
59
60
+ /* --------------------------------------------------------------------------------------------- */
61
+
58
62
inline static gboolean
59
63
mc_fhl_is_file_exec (const file_entry_t * fe )
60
64
{
61
65
return is_exe (fe -> st .st_mode );
62
66
}
63
67
68
+ /* --------------------------------------------------------------------------------------------- */
69
+
64
70
inline static gboolean
65
71
mc_fhl_is_dir (const file_entry_t * fe )
66
72
{
@@ -70,6 +76,8 @@ mc_fhl_is_dir (const file_entry_t * fe)
70
76
return S_ISDIR (fe -> st .st_mode );
71
77
}
72
78
79
+ /* --------------------------------------------------------------------------------------------- */
80
+
73
81
inline static gboolean
74
82
mc_fhl_is_link (const file_entry_t * fe )
75
83
{
@@ -79,24 +87,32 @@ mc_fhl_is_link (const file_entry_t * fe)
79
87
return S_ISLNK (fe -> st .st_mode );
80
88
}
81
89
90
+ /* --------------------------------------------------------------------------------------------- */
91
+
82
92
inline static gboolean
83
93
mc_fhl_is_hlink (const file_entry_t * fe )
84
94
{
85
95
return (fe -> st .st_nlink > 1 );
86
96
}
87
97
98
+ /* --------------------------------------------------------------------------------------------- */
99
+
88
100
inline static gboolean
89
101
mc_fhl_is_link_to_dir (const file_entry_t * fe )
90
102
{
91
103
return mc_fhl_is_link (fe ) && fe -> f .link_to_dir ;
92
104
}
93
105
106
+ /* --------------------------------------------------------------------------------------------- */
107
+
94
108
inline static gboolean
95
109
mc_fhl_is_stale_link (const file_entry_t * fe )
96
110
{
97
111
return mc_fhl_is_link (fe ) ? fe -> f .stale_link : !mc_fhl_is_file (fe );
98
112
}
99
113
114
+ /* --------------------------------------------------------------------------------------------- */
115
+
100
116
inline static gboolean
101
117
mc_fhl_is_device_char (const file_entry_t * fe )
102
118
{
@@ -106,6 +122,8 @@ mc_fhl_is_device_char (const file_entry_t * fe)
106
122
return S_ISCHR (fe -> st .st_mode );
107
123
}
108
124
125
+ /* --------------------------------------------------------------------------------------------- */
126
+
109
127
inline static gboolean
110
128
mc_fhl_is_device_block (const file_entry_t * fe )
111
129
{
@@ -115,6 +133,8 @@ mc_fhl_is_device_block (const file_entry_t * fe)
115
133
return S_ISBLK (fe -> st .st_mode );
116
134
}
117
135
136
+ /* --------------------------------------------------------------------------------------------- */
137
+
118
138
inline static gboolean
119
139
mc_fhl_is_special_socket (const file_entry_t * fe )
120
140
{
@@ -124,6 +144,8 @@ mc_fhl_is_special_socket (const file_entry_t * fe)
124
144
return S_ISSOCK (fe -> st .st_mode );
125
145
}
126
146
147
+ /* --------------------------------------------------------------------------------------------- */
148
+
127
149
inline static gboolean
128
150
mc_fhl_is_special_fifo (const file_entry_t * fe )
129
151
{
@@ -133,6 +155,8 @@ mc_fhl_is_special_fifo (const file_entry_t * fe)
133
155
return S_ISFIFO (fe -> st .st_mode );
134
156
}
135
157
158
+ /* --------------------------------------------------------------------------------------------- */
159
+
136
160
inline static gboolean
137
161
mc_fhl_is_special_door (const file_entry_t * fe )
138
162
{
@@ -142,6 +166,8 @@ mc_fhl_is_special_door (const file_entry_t * fe)
142
166
return S_ISDOOR (fe -> st .st_mode );
143
167
}
144
168
169
+ /* --------------------------------------------------------------------------------------------- */
170
+
145
171
inline static gboolean
146
172
mc_fhl_is_special (const file_entry_t * fe )
147
173
{
@@ -246,8 +272,6 @@ mc_fhl_get_color_regexp (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * fhl
246
272
return -1 ;
247
273
}
248
274
249
- /* --------------------------------------------------------------------------------------------- */
250
-
251
275
/* --------------------------------------------------------------------------------------------- */
252
276
/*** public functions ****************************************************************************/
253
277
/* --------------------------------------------------------------------------------------------- */
0 commit comments