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
b1570f51
Commit
b1570f51
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Prepended QM_ to QWK function mode bit definitions.
Added support for @REPLYTO kludge line (for future use).
parent
22553e85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/msgtoqwk.cpp
+19
-9
19 additions, 9 deletions
src/sbbs3/msgtoqwk.cpp
with
19 additions
and
9 deletions
src/sbbs3/msgtoqwk.cpp
+
19
−
9
View file @
b1570f51
...
...
@@ -60,7 +60,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
fwrite
(
str
,
QWK_BLOCK_LEN
,
1
,
qwk_fp
);
/* Init header to space */
if
(
msg
->
from_net
.
addr
&&
(
uint
)
subnum
==
INVALID_SUB
)
{
if
(
mode
&
TO_QNET
)
if
(
mode
&
QM_
TO_QNET
)
sprintf
(
from
,
"%.128s"
,
msg
->
from
);
else
if
(
msg
->
from_net
.
type
==
NET_FIDO
)
sprintf
(
from
,
"%.128s@%.128s"
...
...
@@ -85,7 +85,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
else
if
(
msg
->
to_net
.
type
==
NET_INTERNET
)
sprintf
(
to
,
"%.128s"
,(
char
*
)
msg
->
to_net
.
addr
);
else
if
(
msg
->
to_net
.
type
==
NET_QWK
)
{
if
(
mode
&
TO_QNET
)
{
if
(
mode
&
QM_
TO_QNET
)
{
p
=
strchr
((
char
*
)
msg
->
to_net
.
addr
,
'/'
);
if
(
p
)
{
/* Another hop */
p
++
;
...
...
@@ -110,13 +110,13 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
else
sprintf
(
to
,
"%.128s"
,
msg
->
to
);
if
(
msg
->
from_net
.
type
==
NET_QWK
&&
mode
&
VIA
&&
!
msg
->
forwarded
)
{
if
(
msg
->
from_net
.
type
==
NET_QWK
&&
mode
&
QM_
VIA
&&
!
msg
->
forwarded
)
{
sprintf
(
str
,
"@VIA: %.*s%c"
,(
int
)(
sizeof
(
str
)
-
12
),(
char
*
)
msg
->
from_net
.
addr
,
QWK_NEWLINE
);
fwrite
(
str
,
strlen
(
str
),
1
,
qwk_fp
);
size
+=
strlen
(
str
);
}
if
(
mode
&
MSGID
&&
(
uint
)
subnum
!=
INVALID_SUB
)
{
if
(
mode
&
QM_
MSGID
&&
(
uint
)
subnum
!=
INVALID_SUB
)
{
sprintf
(
str
,
"@MSGID: %.*s%c"
,(
int
)(
sizeof
(
str
)
-
12
),
get_msgid
(
&
cfg
,
subnum
,
msg
),
QWK_NEWLINE
);
fwrite
(
str
,
strlen
(
str
),
1
,
qwk_fp
);
...
...
@@ -144,10 +144,18 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
}
}
if
(
msg
->
hdr
.
when_written
.
zone
&&
mode
&
TZ
)
{
if
(
msg
->
hdr
.
when_written
.
zone
&&
mode
&
QM_
TZ
)
{
sprintf
(
str
,
"@TZ: %04x%c"
,
msg
->
hdr
.
when_written
.
zone
,
QWK_NEWLINE
);
fwrite
(
str
,
strlen
(
str
),
1
,
qwk_fp
);
size
+=
strlen
(
str
);
}
size
+=
strlen
(
str
);
}
if
(
msg
->
replyto
!=
NULL
&&
mode
&
QM_REPLYTO
)
{
sprintf
(
str
,
"@REPLYTO: %.*s%c"
,(
int
)(
sizeof
(
str
)
-
12
),
msg
->
replyto
,
QWK_NEWLINE
);
fwrite
(
str
,
strlen
(
str
),
1
,
qwk_fp
);
size
+=
strlen
(
str
);
}
p
=
0
;
for
(
i
=
0
;
i
<
msg
->
total_hfields
;
i
++
)
{
...
...
@@ -158,7 +166,9 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
,
timestr
((
time_t
*
)
msg
->
hfield_dat
[
i
])
,
QWK_NEWLINE
);
fwrite
(
str
,
strlen
(
str
),
1
,
qwk_fp
);
size
+=
strlen
(
str
);
}
}
size
+=
strlen
(
str
);
}
}
buf
=
smb_getmsgtxt
(
&
smb
,
msg
,
1
);
if
(
!
buf
)
...
...
@@ -302,7 +312,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
fputc
(
QWK_NEWLINE
,
qwk_fp
);
/* make sure it ends in CRLF */
size
++
;
}
if
(
mode
&
TAGLINE
&&
!
(
cfg
.
sub
[
subnum
]
->
misc
&
SUB_NOTAG
))
{
if
(
mode
&
QM_
TAGLINE
&&
!
(
cfg
.
sub
[
subnum
]
->
misc
&
SUB_NOTAG
))
{
if
(
!
tear
)
/* no tear line */
sprintf
(
str
,
"
\1
n---%c"
,
QWK_NEWLINE
);
/* so add one */
else
...
...
@@ -346,7 +356,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
sprintf
(
str
,
"%c%-7lu%-13.13s%-25.25s"
"%-25.25s%-25.25s%12s%-8lu%-6lu
\xe1
%c%c%c%c%c"
,
ch
/* message status flag */
,
mode
&
REP
?
(
ulong
)
conf
/* conference or */
,
mode
&
QM_
REP
?
(
ulong
)
conf
/* conference or */
:
msg
->
hdr
.
number
&
MAX_MSGNUM
/* message number */
,
tmp
/* date and time */
,
to
/* To: */
...
...
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