Skip to content
Snippets Groups Projects
Commit 526ad78b authored by rswindell's avatar rswindell
Browse files

Allow maximum newsgroup name length.

If new sub's long name looks like a newsgroup name, copy into newsgroup name.
No longer prompt for QWK name when creating new sub (default to internal code).
parent 2093995d
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,7 @@ at the main and reading messages prompts. ...@@ -107,6 +107,7 @@ at the main and reading messages prompts.
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board Short Name",str2,LEN_SSNAME if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board Short Name",str2,LEN_SSNAME
,K_EDIT)<1) ,K_EDIT)<1)
continue; continue;
#if 0
sprintf(str3,"%.10s",str2); sprintf(str3,"%.10s",str2);
SETHELP(WHERE); SETHELP(WHERE);
/* /*
...@@ -117,7 +118,8 @@ This is the name of the sub-board used for QWK off-line readers. ...@@ -117,7 +118,8 @@ This is the name of the sub-board used for QWK off-line readers.
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board QWK Name",str3,10 if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board QWK Name",str3,10
,K_EDIT)<1) ,K_EDIT)<1)
continue; continue;
sprintf(code,"%.8s",str3); #endif
sprintf(code,"%.8s",str2);
p=strchr(code,SP); p=strchr(code,SP);
if(p) *p=0; if(p) *p=0;
strupr(code); strupr(code);
...@@ -137,7 +139,8 @@ usually an abreviation of the sub-board's name. ...@@ -137,7 +139,8 @@ usually an abreviation of the sub-board's name.
uifc.savnum=0; uifc.savnum=0;
uifc.msg("Invalid Code"); uifc.msg("Invalid Code");
uifc.helpbuf=0; uifc.helpbuf=0;
continue; } continue;
}
if((cfg.sub=(sub_t **)REALLOC(cfg.sub,sizeof(sub_t *)*(cfg.total_subs+1)))==NULL) { if((cfg.sub=(sub_t **)REALLOC(cfg.sub,sizeof(sub_t *)*(cfg.total_subs+1)))==NULL) {
errormsg(WHERE,ERR_ALLOC,nulstr,cfg.total_subs+1); errormsg(WHERE,ERR_ALLOC,nulstr,cfg.total_subs+1);
...@@ -173,7 +176,9 @@ usually an abreviation of the sub-board's name. ...@@ -173,7 +176,9 @@ usually an abreviation of the sub-board's name.
strcpy(cfg.sub[subnum[i]]->code_suffix,code); strcpy(cfg.sub[subnum[i]]->code_suffix,code);
strcpy(cfg.sub[subnum[i]]->lname,str); strcpy(cfg.sub[subnum[i]]->lname,str);
strcpy(cfg.sub[subnum[i]]->sname,str2); strcpy(cfg.sub[subnum[i]]->sname,str2);
strcpy(cfg.sub[subnum[i]]->qwkname,str3); strcpy(cfg.sub[subnum[i]]->qwkname,code);
if(strchr(str,'.') && strchr(str,' ')==NULL)
strcpy(cfg.sub[subnum[i]]->newsgroup,str);
cfg.sub[subnum[i]]->misc=(SUB_NSDEF|SUB_SSDEF|SUB_QUOTE|SUB_TOUSER cfg.sub[subnum[i]]->misc=(SUB_NSDEF|SUB_SSDEF|SUB_QUOTE|SUB_TOUSER
|SUB_HDRMOD|SUB_FAST); |SUB_HDRMOD|SUB_FAST);
cfg.sub[subnum[i]]->ptridx=ptridx; cfg.sub[subnum[i]]->ptridx=ptridx;
...@@ -345,8 +350,8 @@ This is the name of the sub-board used for newsgroup readers. If no name ...@@ -345,8 +350,8 @@ This is the name of the sub-board used for newsgroup readers. If no name
is configured here, a name will be automatically generated from the is configured here, a name will be automatically generated from the
sub-board's name and group name. sub-board's name and group name.
*/ */
uifc.input(WIN_MID|WIN_SAV,0,17,"Newsgroup" uifc.input(WIN_MID|WIN_SAV,0,17,""
,cfg.sub[i]->newsgroup,50,K_EDIT); ,cfg.sub[i]->newsgroup,sizeof(cfg.sub[i]->newsgroup)-1,K_EDIT);
break; break;
case 5: case 5:
uifc.savnum=2; uifc.savnum=2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment