Extract file_search.c from misc2.c

Continue to split misc2.c in many other files (see #209).

The only changed I made to the moved code was adding
`vim_free(ff_expand_buffer)` to `free_finfile()`. This is was needed
because `ff_expand_buffer` was moved from `misc2.c` to `file_search.c`.
This commit is contained in:
Felipe Oliveira Carvalho 2014-02-28 02:54:47 -03:00 committed by Thiago de Arruda
parent 007a19c497
commit e18c075b70
8 changed files with 1627 additions and 1606 deletions

View File

@ -33,6 +33,7 @@
#include "message.h"
#include "misc1.h"
#include "misc2.h"
#include "file_search.h"
#include "garray.h"
#include "move.h"
#include "normal.h"

View File

@ -37,6 +37,7 @@
#include "message.h"
#include "misc1.h"
#include "misc2.h"
#include "file_search.h"
#include "garray.h"
#include "move.h"
#include "normal.h"

1599
src/file_search.c Normal file

File diff suppressed because it is too large Load Diff

23
src/file_search.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef NEOVIM_FIND_FILE_H
#define NEOVIM_FIND_FILE_H
void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *
stopdirs, int level, int free_visited,
int find_what, void *search_ctx_arg,
int tagfile,
char_u *rel_fname));
char_u *vim_findfile_stopdir __ARGS((char_u *buf));
void vim_findfile_cleanup __ARGS((void *ctx));
char_u *vim_findfile __ARGS((void *search_ctx_arg));
void vim_findfile_free_visited __ARGS((void *search_ctx_arg));
char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first,
char_u *rel_fname));
void free_findfile __ARGS((void));
char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options,
char_u *rel_fname));
char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options,
int first, char_u *path_option,
int find_what, char_u *rel_fname,
char_u *suffixes));
#endif /* NEOVIM_FIND_FILE_H */

File diff suppressed because it is too large Load Diff

View File

@ -91,23 +91,6 @@ void crypt_decode __ARGS((char_u *ptr, long len));
void crypt_init_keys __ARGS((char_u *passwd));
void free_crypt_key __ARGS((char_u *key));
char_u *get_crypt_key __ARGS((int store, int twice));
void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *
stopdirs, int level, int free_visited,
int find_what, void *search_ctx_arg,
int tagfile,
char_u *rel_fname));
char_u *vim_findfile_stopdir __ARGS((char_u *buf));
void vim_findfile_cleanup __ARGS((void *ctx));
char_u *vim_findfile __ARGS((void *search_ctx_arg));
void vim_findfile_free_visited __ARGS((void *search_ctx_arg));
char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first,
char_u *rel_fname));
char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options,
char_u *rel_fname));
char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options,
int first, char_u *path_option,
int find_what, char_u *rel_fname,
char_u *suffixes));
int vim_chdir __ARGS((char_u *new_dir));
int get_user_name __ARGS((char_u *buf, int len));
void sort_strings __ARGS((char_u **files, int count));

View File

@ -29,6 +29,7 @@
#include "message.h"
#include "misc1.h"
#include "misc2.h"
#include "file_search.h"
#include "garray.h"
#include "move.h"
#include "option.h"

View File

@ -29,6 +29,7 @@
#include "message.h"
#include "misc1.h"
#include "misc2.h"
#include "file_search.h"
#include "garray.h"
#include "move.h"
#include "normal.h"