Add Options (U-/U+) to Menu Type 201, to goto next unread or previous unread message area

This commit is contained in:
Scott Street 2002-12-13 05:43:33 +00:00
parent ad0a3c0a2d
commit 965ccb2e25
7 changed files with 78 additions and 3 deletions

View File

@ -477,3 +477,4 @@ JN|Bestand meesturen [j/N]:
|Oude adres: |Oude adres:
|Use your alias ( |Use your alias (
YN|) to post this message [Y/n]: YN|) to post this message [Y/n]:
|No areas with unread messages

View File

@ -155,11 +155,11 @@ YN|messages, read your mail now? [Y/n]:
|You have paged the Sysop the maximum times allowed. |You have paged the Sysop the maximum times allowed.
|Sysop currently is not available ... please leave a comment |Sysop currently is not available ... please leave a comment
|Posting message in area: |Posting message in area:
|From : |From :
|To : | To :
|Verifying user ... |Verifying user ...
|User not found. Try again, or (Enter) to quit |User not found. Try again, or (Enter) to quit
|Subject : |Subj :
YN|Abort Message [y/N] ?: YN|Abort Message [y/N] ?:
YN|Private [y/N]: YN|Private [y/N]:
|Begin your message now, Blank line to end |Begin your message now, Blank line to end
@ -477,3 +477,4 @@ YN|Attach file [y/N]:
|Old address: |Old address:
|Use your alias ( |Use your alias (
YN|) to post this message [Y/n]: YN|) to post this message [Y/n]:
|No more areas with unread messages

View File

@ -477,3 +477,4 @@ YN|Adxuntar ficheiro [s/N]:
|Enderezo vello: |Enderezo vello:
|¨Queres usa-lo alias ( |¨Queres usa-lo alias (
SN|) nesta mensaxe? [S/n]: SN|) nesta mensaxe? [S/n]:
|No more areas with unread messages

View File

@ -477,3 +477,4 @@ JN|Datei anhaengen [j/N]:
|Alte Adresse: |Alte Adresse:
|Moechten Sie Ihren Aliasnamen ( |Moechten Sie Ihren Aliasnamen (
JN|) als Absender verwenden [J/n] JN|) als Absender verwenden [J/n]
|No more areas with unread messages

View File

@ -477,3 +477,4 @@ SN|Allega file [s/N]:
|Old address: |Old address:
|Use your alias ( |Use your alias (
YN|) to post this message [Y/n]: YN|) to post this message [Y/n]:
|No more areas with unread messages

View File

@ -477,3 +477,4 @@ YN|Adjuntar fichero [s/N]:
|Direcci¢n antigua: |Direcci¢n antigua:
|Usar tu alias ( |Usar tu alias (
SN|) para este mensaje [S/n]: SN|) para este mensaje [S/n]:
|No more areas with unread messages

View File

@ -1535,6 +1535,7 @@ void MsgArea_List(char *Option)
long offset; long offset;
char *temp; char *temp;
lastread LR; lastread LR;
int loopcount=0;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
@ -1570,6 +1571,74 @@ void MsgArea_List(char *Option)
if (strcmp(Option, "N") == 0) { if (strcmp(Option, "N") == 0) {
iCheckNew = TRUE; iCheckNew = TRUE;
} else { } else {
if (strcmp(Option, "U+") == 0)
while(TRUE) {
iMsgAreaNumber++;
if (iMsgAreaNumber >= iAreaNum) {
iMsgAreaNumber = 0;
loopcount++;
if ( loopcount > 1 ) {
pout(LIGHTRED, BLACK, (char *) Language(479));
iMsgAreaNumber = iOldArea;
Enter(2);
Pause();
return;
}
}
offset = msgshdr.hdrsize + (iMsgAreaNumber * (msgshdr.recsize + msgshdr.syssize));
if(fseek(pAreas, offset, 0) != 0) {
printf("Can't move pointer there.");
}
fread(&msgs, msgshdr.recsize, 1, pAreas);
if ((Access(exitinfo.Security, msgs.RDSec)) && (msgs.Active) && (strlen(msgs.Password) == 0)) {
if(Msg_Open(msgs.Base)){
MsgBase.Highest = Msg_Highest();
LR.UserID = grecno;
if ( Msg_GetLastRead(&LR) != TRUE ){
LR.HighReadMsg = 0;
}
if (MsgBase.Highest > LR.HighReadMsg )
break;
}
}
}
if (strcmp(Option, "U-") == 0)
while(TRUE) {
iMsgAreaNumber--;
if (iMsgAreaNumber < 0) {
iMsgAreaNumber = iAreaNum - 1;
loopcount++;
if ( loopcount > 1 ) {
pout(LIGHTRED, BLACK, (char *) Language(479));
iMsgAreaNumber = iOldArea;
Enter(2);
Pause();
return;
}
}
offset = msgshdr.hdrsize + (iMsgAreaNumber * (msgshdr.recsize + msgshdr.syssize));
if(fseek(pAreas, offset, 0) != 0) {
printf("Can't move pointer there.");
}
fread(&msgs, msgshdr.recsize, 1, pAreas);
if ((Access(exitinfo.Security, msgs.RDSec)) && (msgs.Active) && (strlen(msgs.Password) == 0)) {
if(Msg_Open(msgs.Base)){
MsgBase.Highest = Msg_Highest();
LR.UserID = grecno;
if ( Msg_GetLastRead(&LR) != TRUE ){
LR.HighReadMsg = 0;
}
if (MsgBase.Highest > LR.HighReadMsg )
break;
}
}
}
if (strcmp(Option, "M+") == 0) if (strcmp(Option, "M+") == 0)
while(TRUE) { while(TRUE) {
iMsgAreaNumber++; iMsgAreaNumber++;