summaryrefslogtreecommitdiff
path: root/archivers/unrar/patches/patch-aa
blob: f82d2fc024749230d368c293270fb275cffeba73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
*** smallfn.c.bak	Mon May 19 23:58:11 1997
--- smallfn.c	Tue May 20 00:19:28 1997
***************
*** 92,99 ****
        }
        if (Choice==4)
        {
          mprintf(MAskNewName);
!         gets(Name);
          continue;
        }
        if (Choice==5)
--- 92,103 ----
        }
        if (Choice==4)
        {
+ 	char *s;
          mprintf(MAskNewName);
! 	*Name = '\0';
! 	fgets(Name, NM, stdin);
! 	if ((s = strchr(Name, '\n')) != NULL)
! 		*s = '\0';
          continue;
        }
        if (Choice==5)
***************
*** 110,116 ****
  int GetKey(void)
  {
    char Str[80];
!   gets(Str);
    return(Str[0]);
  }
  
--- 114,123 ----
  int GetKey(void)
  {
    char Str[80];
!   *Str = '\0';
!   fgets(Str, 80, stdin);
!   if (*Str == '\n')
! 	*Str = '\0';
    return(Str[0]);
  }