Fixed email address posting - and _ characters
This commit is contained in:
parent
6d4d734ff8
commit
d68d0d67a0
@ -34,6 +34,7 @@ v0.37.5 12-Jul-2003 - 10-Aug-2003
|
|||||||
set to one hour to support very long scans.
|
set to one hour to support very long scans.
|
||||||
Changed logging during user login.
|
Changed logging during user login.
|
||||||
Fixed bugs in QWK mail upload processing.
|
Fixed bugs in QWK mail upload processing.
|
||||||
|
Allow - and _ in email names (GetstrU function).
|
||||||
|
|
||||||
mbsetup:
|
mbsetup:
|
||||||
Added menu entry 1.5.21 for setting maximum allowed logins.
|
Added menu entry 1.5.21 for setting maximum allowed logins.
|
||||||
|
@ -144,45 +144,45 @@ void GetstrC(char *sStr, int iMaxlen)
|
|||||||
*/
|
*/
|
||||||
void GetstrU(char *sStr, int iMaxlen)
|
void GetstrU(char *sStr, int iMaxlen)
|
||||||
{
|
{
|
||||||
unsigned char ch = 0;
|
unsigned char ch = 0;
|
||||||
int iPos = 0;
|
int iPos = 0;
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
|
if ((ttyfd = open ("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
|
||||||
|
perror("open 6");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Setraw();
|
||||||
|
|
||||||
|
strcpy(sStr, "");
|
||||||
|
alarm_on();
|
||||||
|
|
||||||
|
while (ch != 13) {
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if ((ttyfd = open ("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
|
ch = Readkey();
|
||||||
perror("open 6");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Setraw();
|
|
||||||
|
|
||||||
strcpy(sStr, "");
|
if ((ch == 8) || (ch == KEY_DEL) || (ch == 127)) {
|
||||||
alarm_on();
|
if (iPos > 0) {
|
||||||
|
printf("\b \b");
|
||||||
while (ch != 13) {
|
sStr[--iPos] = '\0';
|
||||||
|
} else
|
||||||
fflush(stdout);
|
putchar('\007');
|
||||||
ch = Readkey();
|
|
||||||
|
|
||||||
if ((ch == 8) || (ch == KEY_DEL) || (ch == 127)) {
|
|
||||||
if (iPos > 0) {
|
|
||||||
printf("\b \b");
|
|
||||||
sStr[--iPos] = '\0';
|
|
||||||
} else
|
|
||||||
putchar('\007');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isalnum(ch) || (ch == '@') || (ch == '.')) {
|
|
||||||
if (iPos <= iMaxlen) {
|
|
||||||
iPos++;
|
|
||||||
sprintf(sStr, "%s%c", sStr, ch);
|
|
||||||
printf("%c", ch);
|
|
||||||
} else
|
|
||||||
putchar('\007');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Unsetraw();
|
if (isalnum(ch) || (ch == '@') || (ch == '.') || (ch == '-') || (ch == '_')) {
|
||||||
close(ttyfd);
|
if (iPos <= iMaxlen) {
|
||||||
printf("\n");
|
iPos++;
|
||||||
|
sprintf(sStr, "%s%c", sStr, ch);
|
||||||
|
printf("%c", ch);
|
||||||
|
} else
|
||||||
|
putchar('\007');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Unsetraw();
|
||||||
|
close(ttyfd);
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user