Skip to content

Commit

Permalink
Added default for setting group
Browse files Browse the repository at this point in the history
* Addresses feature request #111
  • Loading branch information
roberthawdon committed Sep 3, 2019
1 parent 4ddf935 commit 4424a10
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/showmenus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,19 +1112,22 @@ void modify_group_input()
struct group *gresult;
size_t bufsize;
char errortxt[256];
int i;
int status;
int i, menuLen, status;

groupInputLoop:
move(0,0);
clrtoeol();
mvprintw(0, 0, "Set Group:");
menuLen = (strlen(ownerinput) + 14);
mvprintw(0, 0, "Set Group (%s):", ownerinput);
curs_set(TRUE);
move(0,11);
move(0,menuLen);
status = readline(groupinput, 256, "");
curs_set(FALSE);

if (status != -1){
if (!strcmp(groupinput, "")){
sprintf(groupinput, "%s", ownerinput);
}
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (bufsize == -1) /* Value was indeterminate */
{
Expand Down

0 comments on commit 4424a10

Please sign in to comment.