Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
a42b1476
Commit
a42b1476
authored
6 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Pass the sort order ("newest" or "oldest" first) as an arg when printing the
Mail.*LstHdr text strings.
parent
58d50222
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/readmail.cpp
+15
-13
15 additions, 13 deletions
src/sbbs3/readmail.cpp
src/sbbs3/sbbs.h
+1
-1
1 addition, 1 deletion
src/sbbs3/sbbs.h
src/sbbs3/text_defaults.c
+9
-8
9 additions, 8 deletions
src/sbbs3/text_defaults.c
with
25 additions
and
22 deletions
src/sbbs3/readmail.cpp
+
15
−
13
View file @
a42b1476
...
...
@@ -131,11 +131,12 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
else
act
=
NODE_RMAL
;
action
=
act
;
char
*
order
=
(
lm_mode
&
LM_REVERSE
)
?
"newest"
:
"oldest"
;
if
(
smb
.
msgs
>
1
&&
which
!=
MAIL_ALL
)
{
if
(
which
==
MAIL_SENT
)
bp
uts
(
text
[
MailSentLstHdr
]);
bp
rintf
(
text
[
MailSentLstHdr
]
,
order
);
else
bp
uts
(
text
[
MailWaitingLstHdr
]);
bp
rintf
(
text
[
MailWaitingLstHdr
]
,
order
);
for
(
smb
.
curmsg
=
0
;
smb
.
curmsg
<
smb
.
msgs
&&
!
msgabort
();
smb
.
curmsg
++
)
{
if
(
msg
.
total_hfields
)
...
...
@@ -219,6 +220,7 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
if
(
smb
.
status
.
last_msg
!=
last
||
lm_mode
!=
last_mode
)
{
/* New messages */
last
=
smb
.
status
.
last_msg
;
free
(
mail
);
order
=
(
lm_mode
&
LM_REVERSE
)
?
"newest"
:
"oldest"
;
mail
=
loadmail
(
&
smb
,
&
smb
.
msgs
,
usernumber
,
which
,
lm_mode
);
/* So re-load */
if
(
!
smb
.
msgs
)
break
;
...
...
@@ -582,11 +584,11 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
else
i
=
smb
.
curmsg
;
if
(
which
==
MAIL_SENT
)
bp
uts
(
text
[
MailSentLstHdr
]);
bp
rintf
(
text
[
MailSentLstHdr
]
,
order
);
else
if
(
which
==
MAIL_ALL
)
bp
uts
(
text
[
MailOnSystemLstHdr
]);
bp
rintf
(
text
[
MailOnSystemLstHdr
]
,
order
);
else
bp
uts
(
text
[
MailWaitingLstHdr
]);
bp
rintf
(
text
[
MailWaitingLstHdr
]
,
order
);
for
(
u
=
i
;
u
<
smb
.
msgs
&&
!
msgabort
();
u
++
)
{
if
(
msg
.
total_hfields
)
smb_freemsgmem
(
&
msg
);
...
...
@@ -753,11 +755,11 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
v
=
smb
.
msgs
;
if
(
which
==
MAIL_SENT
)
bp
uts
(
text
[
MailSentLstHdr
]);
bp
rintf
(
text
[
MailSentLstHdr
]
,
order
);
else
if
(
which
==
MAIL_ALL
)
bp
uts
(
text
[
MailOnSystemLstHdr
]);
bp
rintf
(
text
[
MailOnSystemLstHdr
]
,
order
);
else
bp
uts
(
text
[
MailWaitingLstHdr
]);
bp
rintf
(
text
[
MailWaitingLstHdr
]
,
order
);
for
(;
u
<
v
;
u
++
)
{
if
(
msg
.
total_hfields
)
smb_freemsgmem
(
&
msg
);
...
...
@@ -867,7 +869,7 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
bputs
(
text
[
SearchStringPrompt
]);
if
(
!
getstr
(
search_str
,
40
,
K_LINE
|
K_UPPER
|
K_EDIT
|
K_AUTODEL
))
break
;
searchmail
(
mail
,
(
long
)
i64
,
smb
.
msgs
,
which
,
search_str
);
searchmail
(
mail
,
(
long
)
i64
,
smb
.
msgs
,
which
,
search_str
,
order
);
break
;
case
'?'
:
menu
(
menu_file
);
...
...
@@ -903,7 +905,7 @@ void sbbs_t::readmail(uint usernumber, int which, long lm_mode)
current_msg
=
NULL
;
}
long
sbbs_t
::
searchmail
(
mail_t
*
mail
,
long
start
,
long
msgs
,
int
which
,
const
char
*
search
)
long
sbbs_t
::
searchmail
(
mail_t
*
mail
,
long
start
,
long
msgs
,
int
which
,
const
char
*
search
,
const
char
*
order
)
{
char
*
buf
;
char
subj
[
128
];
...
...
@@ -928,11 +930,11 @@ long sbbs_t::searchmail(mail_t *mail, long start, long msgs, int which, const ch
if
(
strstr
(
buf
,
search
)
||
strstr
(
subj
,
search
))
{
if
(
!
found
)
{
if
(
which
==
MAIL_SENT
)
bp
uts
(
text
[
MailSentLstHdr
]);
bp
rintf
(
text
[
MailSentLstHdr
]
,
order
);
else
if
(
which
==
MAIL_ALL
)
bp
uts
(
text
[
MailOnSystemLstHdr
]);
bp
rintf
(
text
[
MailOnSystemLstHdr
]
,
order
);
else
bp
uts
(
text
[
MailWaitingLstHdr
]);
bp
rintf
(
text
[
MailWaitingLstHdr
]
,
order
);
}
if
(
which
==
MAIL_ALL
)
bprintf
(
text
[
MailOnSystemLstFmt
]
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/sbbs.h
+
1
−
1
View file @
a42b1476
...
...
@@ -683,7 +683,7 @@ public:
/* readmail.cpp */
void
readmail
(
uint
usernumber
,
int
which
,
long
lm_mode
=
0
);
bool
readmail_inside
;
long
searchmail
(
mail_t
*
,
long
start
,
long
msgss
,
int
which
,
const
char
*
search
);
long
searchmail
(
mail_t
*
,
long
start
,
long
msgss
,
int
which
,
const
char
*
search
,
const
char
*
order
);
/* bulkmail.cpp */
bool
bulkmail
(
uchar
*
ar
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/text_defaults.c
+
9
−
8
View file @
a42b1476
...
...
@@ -24,7 +24,7 @@ const char * const text_defaults[TOTAL_TEXT]={
"
\xc4\xc4\xc4\xc4\xc4\xfa\xfa\xfa\xfa\xfa\xfa\x01\x6e
"
// 009 MsgDate
,
"
\x01\x5f\x0d\x0a\x01\x62\x01\x68\x45\x2d\x6d\x61\x69\x6c\x20\x28\x55\x73\x65\x72\x20\x6e\x61\x6d\x65\x20\x6f\x72\x20\x6e\x75\x6d
"
"
\x62\x65\x72\x29\x3a\x20\x01\x77
"
// 010 Email
,
"
\x0d\x0a\x50\x6f\x73\x74\x20\x6f\x6e\x20\x25\x73\x20\x25\x73
"
// 011 Post
,
"
\x0d\x0a\x50\x6f\x73\x74\x20\x6f\x6e\x20\x25\x73\
x01\x5c\
x20\x25\x73
"
// 011 Post
,
"
\x01\x72\x01\x68\x0d\x0a\x07\x59\x6f\x75\x20\x68\x61\x76\x65\x20\x73\x65\x6e\x74\x20\x74\x6f\x6f\x20\x6d\x61\x6e\x79\x20\x45\x2d
"
"
\x6d\x61\x69\x6c\x73\x20\x74\x6f\x64\x61\x79\x2e\x0d\x0a
"
// 012 TooManyEmailsToday
,
"
\x01\x72\x01\x68\x0d\x0a\x07\x59\x6f\x75\x20\x68\x61\x76\x65\x20\x70\x6f\x73\x74\x65\x64\x20\x74\x6f\x6f\x20\x6d\x61\x6e\x79\x20
"
...
...
@@ -78,7 +78,8 @@ const char * const text_defaults[TOTAL_TEXT]={
,
"
\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x77\x72\x69\x74\x65\x20\x74\x6f\x20\x74\x68\x65\x20\x61\x75\x74\x6f\x2d
"
"
\x6d\x65\x73\x73\x61\x67\x65\x2e\x0d\x0a
"
// 044 R_AutoMsg
,
"
\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x68\x61\x76\x65\x20\x6e\x6f\x20\x25\x73\x2e\x0d\x0a
"
// 045 NoMailWaiting
,
"
\x01\x5f\x0d\x0a\x01\x71\x01\x67\x01\x68\x4d\x61\x69\x6c\x20\x57\x61\x69\x74\x69\x6e\x67\x3a\x0d\x0a\x0d\x0a
"
// 046 MailWaitingLstHdr
,
"
\x01\x5f\x0d\x0a\x01\x71\x01\x67\x01\x68\x4d\x61\x69\x6c\x20\x57\x61\x69\x74\x69\x6e\x67\x20\x28\x25\x73\x20\x66\x69\x72\x73\x74
"
"
\x29\x3a\x0d\x0a\x0d\x0a
"
// 046 MailWaitingLstHdr
,
"
\x01\x67\x01\x68\x25\x34\x64\x20\x01\x6e\x01\x67\x25\x2d\x32\x35\x2e\x32\x35\x73\x20\x01\x68\x25\x63\x01\x6e\x01\x67\x20\x25\x2e
"
"
\x34\x36\x73\x0d\x0a
"
// 047 MailWaitingLstFmt
,
"
\x01\x5f\x0d\x0a\x01\x79\x01\x68\x53\x74\x61\x72\x74\x20\x77\x69\x74\x68\x20\x6e\x75\x6d\x62\x65\x72\x20\x5b\x01\x77\x25\x75\x01
"
...
...
@@ -104,7 +105,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,
"
\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x68\x61\x76\x65\x20\x6e\x6f\x20\x73\x65\x6e\x74\x20\x6d\x65\x73\x73\x61\x67\x65\x73\x20\x70\x65
"
"
\x6e\x64\x69\x6e\x67\x2e\x0d\x0a
"
// 059 NoMailSent
,
"
\x0d\x0a\x01\x71\x01\x67\x01\x68\x4d\x61\x69\x6c\x20\x74\x68\x61\x74\x20\x79\x6f\x75\x27\x76\x65\x20\x73\x65\x6e\x74\x20\x73\x74
"
"
\x69\x6c\x6c\x20\x70\x65\x6e\x64\x69\x6e\x67\x3a\x0d\x0a\x0d\x0a\x01\x6e
"
// 060 MailSentLstHdr
"
\x69\x6c\x6c\x20\x70\x65\x6e\x64\x69\x6e\x67\
x20\x28\x25\x73\x20\x66\x69\x72\x73\x74\x29\
x3a\x0d\x0a\x0d\x0a\x01\x6e
"
// 060 MailSentLstHdr
,
"
\x01\x6e\x0d\x0a\x01\x63\xfe\x20\x01\x68\x01\x62\x52\x65\x61\x64\x69\x6e\x67\x20\x53\x65\x6e\x74\x20\x45\x2d\x6d\x61\x69\x6c\x20
"
"
\x01\x6e\x01\x63\xfe\x20\x01\x68\x01\x62\x28\x01\x77\x3f\x01\x62\x3d\x4d\x65\x6e\x75\x29\x20\x28\x01\x77\x25\x75\x01\x62\x20\x6f
"
"
\x66\x20\x01\x77\x25\x75\x01\x62\x29\x3a\x20\x01\x6e
"
// 061 ReadingSentMail
...
...
@@ -331,11 +332,11 @@ const char * const text_defaults[TOTAL_TEXT]={
,
"
\x0d\x0a\x01\x72\x01\x68\x42\x61\x64\x20\x66\x69\x6c\x65\x6e\x61\x6d\x65\x2e\x0d\x0a
"
// 203 BadFilename
,
"
\x55\x70\x6c\x6f\x61\x64\x20\x27\x25\x73\x27\x20\x74\x6f\x20\x53\x79\x73\x6f\x70\x20\x64\x69\x72\x65\x63\x74\x6f\x72\x79
"
// 204 UploadToSysopDirQ
,
"
\x55\x70\x6c\x6f\x61\x64\x20\x27\x25\x73\x27\x20\x74\x6f\x20\x55\x73\x65\x72\x20\x64\x69\x72\x65\x63\x74\x6f\x72\x79
"
// 205 UploadToUserDirQ
,
"
\x55\x70\x6c\x6f\x61\x64\x20\x27\x25\x73\x27\x20\x74\x6f\x20\x25\x73\x20\x25\x73
"
// 206 UploadToCurDirQ
,
"
\x55\x70\x6c\x6f\x61\x64\x20\x27\x25\x73\x27\x20\x74\x6f\x20\x25\x73\
x01\x5c\
x20\x25\x73
"
// 206 UploadToCurDirQ
,
"
\x0d\x0a\x01\x72\x01\x68\x01\x69\x54\x68\x61\x74\x20\x66\x69\x6c\x65\x20\x69\x73\x20\x61\x6c\x72\x65\x61\x64\x79\x20\x74\x68\x65
"
"
\x72\x65\x21\x01\x6e\x0d\x0a
"
// 207 FileAlreadyThere
,
"
\x54\x68\x61\x74\x20\x66\x69\x6c\x65\x20\x69\x73\x20\x61\x6c\x72\x65\x61\x64\x79\x20\x6f\x6e\x20\x64\x69\x73\x6b\x2e\x
20\x41\x64
"
"
\x64\x20\x74\x6f\x20\x64\x61\x74\x61\x20\x62\x61\x73\x65
"
// 208 FileOnDiskAddQ
,
"
\x54\x68\x61\x74\x20\x66\x69\x6c\x65\x20\x69\x73\x20\x61\x6c\x72\x65\x61\x64\x79\x20\x6f\x6e\x20\x64\x69\x73\x6b\x2e\x
01\x5c\x20
"
"
\
x41\x64\
x64\x20\x74\x6f\x20\x64\x61\x74\x61\x20\x62\x61\x73\x65
"
// 208 FileOnDiskAddQ
,
"
\x0d\x0a\x01\x72\x01\x68\x01\x69\x54\x68\x61\x74\x20\x66\x69\x6c\x65\x20\x69\x73\x20\x6e\x6f\x74\x20\x6f\x6e\x20\x64\x69\x73\x6b
"
"
\x21\x01\x6e\x0d\x0a
"
// 209 FileNotOnDisk
,
"
\x0d\x0a\x01\x72\x01\x68\x01\x69\x50\x6c\x65\x61\x73\x65\x20\x75\x70\x6c\x6f\x61\x64\x20\x66\x69\x6c\x65\x73\x20\x77\x69\x74\x68
"
...
...
@@ -358,8 +359,8 @@ const char * const text_defaults[TOTAL_TEXT]={
"
\x74\x20\x6f\x66\x20\x74\x68\x69\x73\x20\x66\x69\x6c\x65\x20\x28\x01\x68\x01\x77\x47\x01\x6e\x01\x67\x2c\x20\x01\x68\x01\x77\x52
"
"
\x01\x6e\x01\x67\x2c\x20\x6f\x72\x20\x01\x68\x01\x77\x58\x01\x6e\x01\x67\x29\x3a\x20\x01\x6e
"
// 218 RateThisFile
,
"
\x5b\x25\x63\x5d\x20
"
// 219 Rated
,
"
\x49\x73\x20\x74\x68\x69\x73\x20\x75\x70\x6c\x6f\x61\x64\x20\x70\x61\x72\x74\x20\x6f\x66\x20\x61\x20\x73\x65\x74\x
20\x28\x6d\x75
"
"
\x6c\x74\x69\x70\x6c\x65\x20\x66\x69\x6c\x65\x73\x29
"
// 220 MultipleDiskQ
,
"
\x49\x73\x20\x74\x68\x69\x73\x20\x75\x70\x6c\x6f\x61\x64\x20\x70\x61\x72\x74\x20\x6f\x66\x20\x61\x20\x73\x65\x74\x
01\x5c\x20\x28
"
"
\
x6d\x75\
x6c\x74\x69\x70\x6c\x65\x20\x66\x69\x6c\x65\x73\x29
"
// 220 MultipleDiskQ
,
"
\x01\x5f\x01\x79\x01\x68\x48\x6f\x77\x20\x6d\x61\x6e\x79\x20\x66\x69\x6c\x65\x73\x20\x74\x6f\x74\x61\x6c\x3a\x20\x01\x6e
"
// 221 HowManyDisksTotal
,
"
\x01\x5f\x01\x79\x01\x68\x57\x68\x69\x63\x68\x20\x66\x69\x6c\x65\x20\x6e\x75\x6d\x62\x65\x72\x20\x69\x73\x20\x79\x6f\x75\x72\x20
"
"
\x75\x70\x6c\x6f\x61\x64\x3a\x20\x01\x6e
"
// 222 NumberOfFile
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment