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 4f0d2700bc058d1adacc0d4bc4cb0e6ddec7fe11

Define a macro for max cmdline command name length
Less magic numbers!
Author: xaizek
Author date (UTC): 2013-01-06 18:18
Committer name: xaizek
Committer date (UTC): 2013-01-06 18:18
Parent(s): abf0b11b017db418bc34b4272900561b25e7443a
Signing key:
Tree: 2d2fed4908e90b572b3ae81bb970c319c2145c41
File Lines added Lines deleted
src/engine/cmds.c 6 5
File src/engine/cmds.c changed (mode: 100644) (index 92789baac..a6e2c1bc6)
33 33 #include "cmds.h" #include "cmds.h"
34 34
35 35 #define MAX_CMD_RECURSION 16 #define MAX_CMD_RECURSION 16
36 #define MAX_CMD_NAME_LEN 256
36 37 #define INVALID_MARK -4096 #define INVALID_MARK -4096
37 38
38 39 typedef enum typedef enum
 
... ... int
170 171 execute_cmd(const char cmd[]) execute_cmd(const char cmd[])
171 172 { {
172 173 cmd_info_t cmd_info; cmd_info_t cmd_info;
173 char cmd_name[256];
174 char cmd_name[MAX_CMD_NAME_LEN];
174 175 cmd_t *cur; cmd_t *cur;
175 176 const char *args; const char *args;
176 177 int execution_code; int execution_code;
 
... ... int
476 477 get_cmd_info(const char cmd[], cmd_info_t *info) get_cmd_info(const char cmd[], cmd_info_t *info)
477 478 { {
478 479 cmd_info_t cmd_info; cmd_info_t cmd_info;
479 char cmd_name[256];
480 char cmd_name[MAX_CMD_NAME_LEN];
480 481 cmd_t *cur; cmd_t *cur;
481 482 size_t len; size_t len;
482 483
 
... ... complete_cmd(const char cmd[])
518 519 cmd_name_pos = parse_range(cmd, &cmd_info); cmd_name_pos = parse_range(cmd, &cmd_info);
519 520 if(cmd_name_pos != NULL) if(cmd_name_pos != NULL)
520 521 { {
521 char cmd_name[256];
522 char cmd_name[MAX_CMD_NAME_LEN];
522 523 const char *args; const char *args;
523 524 cmd_t *cur; cmd_t *cur;
524 525
 
... ... skip_prefix_commands(const char cmd[])
553 554 cmd_name_pos = parse_range(cmd, &cmd_info); cmd_name_pos = parse_range(cmd, &cmd_info);
554 555 if(cmd_name_pos != NULL) if(cmd_name_pos != NULL)
555 556 { {
556 char cmd_name[256];
557 char cmd_name[MAX_CMD_NAME_LEN];
557 558 const char *args; const char *args;
558 559 cmd_t *cur; cmd_t *cur;
559 560
 
... ... static int
865 866 command_cmd(const cmd_info_t *cmd_info) command_cmd(const cmd_info_t *cmd_info)
866 867 { {
867 868 int cmp; int cmp;
868 char cmd_name[256];
869 char cmd_name[MAX_CMD_NAME_LEN];
869 870 const char *args; const char *args;
870 871 cmd_t *new, *cur; cmd_t *new, *cur;
871 872
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