Skip to content

Commit 6ecb383

Browse files
committed
Editor: remove unused functions
1 parent 1b3977f commit 6ecb383

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/detection/editor/editor.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,6 @@
44

55
#include <stdlib.h>
66

7-
#if defined(MAXPATH)
8-
#define FF_EXE_PATH_LEN MAXPATH
9-
#elif defined(PATH_MAX)
10-
#define FF_EXE_PATH_LEN PATH_MAX
11-
#else
12-
#define FF_EXE_PATH_LEN 260
13-
#endif
14-
15-
#ifdef _WIN32
16-
static inline char* realpath(const char* restrict file_name, char* restrict resolved_name)
17-
{
18-
char* result = _fullpath(resolved_name, file_name, _MAX_PATH);
19-
if(result)
20-
{
21-
resolved_name[1] = resolved_name[0]; // Drive Name
22-
resolved_name[0] = '/';
23-
}
24-
return result;
25-
}
26-
#endif
27-
287
const char* ffDetectEditor(FFEditorResult* result)
298
{
309
ffStrbufSetS(&result->name, getenv("VISUAL"));
@@ -46,7 +25,7 @@ const char* ffDetectEditor(FFEditorResult* result)
4625
else
4726
ffStrbufSet(&result->path, &result->name);
4827

49-
char buf[FF_EXE_PATH_LEN];
28+
char buf[PATH_MAX + 1];
5029
if (!realpath(result->path.chars, buf))
5130
return NULL;
5231

0 commit comments

Comments
 (0)