#if ENABLE_FEATURE_COMMAND_EDITING
-#if ENABLE_FEATURE_COMMAND_USERNAME_COMPLETION || ENABLE_FEATURE_SH_FANCY_PROMPT
-#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR 1
-#endif
+#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \
+(ENABLE_FEATURE_COMMAND_USERNAME_COMPLETION || ENABLE_FEATURE_SH_FANCY_PROMPT)
/* Maximum length of the linked list for the command line history */
#if !ENABLE_FEATURE_COMMAND_HISTORY
for (nc = 1; nc < ncols && n+nrows < nfiles; n += nrows, nc++) {
printf("%s%-*s", matches[n],
- column_width - strlen(matches[n]), "");
+ (int)(column_width - strlen(matches[n])), "");
}
printf("%s\n", matches[n]);
}
/* After max history, remove the oldest command */
if (i >= MAX_HISTORY) {
free(history[0]);
- for(i = 0; i < MAX_HISTORY-1; i++)
+ for (i = 0; i < MAX_HISTORY-1; i++)
history[i] = history[i+1];
}
history[i++] = xstrdup(command);