xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 9709e8b3cdd5447c147efa43b84ffc62daa6e400

Now more portable with my_wcsdup().
Author: xaizek
Author date (UTC): 2011-06-11 09:27
Committer name: xaizek
Committer date (UTC): 2011-06-11 09:27
Parent(s): e98e410b2398982007e500a6d7281d438f0a04fb
Signing key:
Tree: a60c511ba5f3650884339b0e30950f0ada1b5c65
File Lines added Lines deleted
src/cmdline.c 6 9
src/keys.c 3 1
File src/cmdline.c changed (mode: 100644) (index 702e81848..164f5d821)
... ... cmd_ctrl_i(struct key_info key_info, struct keys_info *keys_info)
606 606 return; return;
607 607
608 608 if(input_stat.line == NULL) if(input_stat.line == NULL)
609 input_stat.line = wcsdup(L"");
609 {
610 input_stat.line = my_wcsdup(L"");
611 if(input_stat.line == NULL)
612 return;
613 }
610 614
611 615 line_completion(&input_stat); line_completion(&input_stat);
612 616 len = (1 + input_stat.len + line_width - 1 + 1)/line_width; len = (1 + input_stat.len + line_width - 1 + 1)/line_width;
 
... ... file_completion(char* filename, char* line_mb, struct line_stats *stat)
1336 1340 x = *temp; x = *temp;
1337 1341 *temp = '\0'; *temp = '\0';
1338 1342
1339 /* I'm really worry about the portability... */
1340 // temp2 = (wchar_t *) wcsdup(stat->line + stat->index)
1341 temp2 = (wchar_t *) malloc((wcslen(stat->line
1342 + stat->index) + 1) * sizeof(wchar_t));
1343 temp2 = my_wcsdup(stat->line + stat->index);
1343 1344 if(temp2 == NULL) if(temp2 == NULL)
1344 {
1345 free(temp2);
1346 1345 return -1; return -1;
1347 }
1348 wcscpy(temp2, stat->line + stat->index);
1349 1346
1350 1347 i = mbstowcs(NULL, line_mb, 0) + mbstowcs(NULL, filename, 0) i = mbstowcs(NULL, line_mb, 0) + mbstowcs(NULL, filename, 0)
1351 1348 + (stat->len - stat->index) + 1; + (stat->len - stat->index) + 1;
File src/keys.c changed (mode: 100644) (index 1e4d9cab3..d06d2ac68)
21 21 #include <stdlib.h> #include <stdlib.h>
22 22 #include <string.h> #include <string.h>
23 23
24 #include "utils.h"
25
24 26 #include "keys.h" #include "keys.h"
25 27
26 28 struct key_chunk_t struct key_chunk_t
 
... ... add_user_keys(const wchar_t *keys, const wchar_t *cmd, int mode)
297 299 free((void*)curr->data.cmd); free((void*)curr->data.cmd);
298 300 } }
299 301 curr->type = USER_CMD; curr->type = USER_CMD;
300 curr->data.cmd = wcsdup(cmd);
302 curr->data.cmd = my_wcsdup(cmd);
301 303 return 0; return 0;
302 304 } }
303 305
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master