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
3261f802
Commit
3261f802
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added smb_getfirstidx() API function.
parent
4e6c5ac8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/smblib/smblib.c
+14
-0
14 additions, 0 deletions
src/smblib/smblib.c
src/smblib/smblib.h
+2
-0
2 additions, 0 deletions
src/smblib/smblib.h
with
16 additions
and
0 deletions
src/smblib/smblib.c
+
14
−
0
View file @
3261f802
...
...
@@ -534,6 +534,20 @@ int SMBCALL smb_getmsgidx(smb_t* smb, smbmsg_t* msg)
return
(
0
);
}
/****************************************************************************/
/* Reads the first index record in the open message base */
/****************************************************************************/
int
SMBCALL
smb_getfirstidx
(
smb_t
*
smb
,
idxrec_t
*
idx
)
{
clearerr
(
smb
->
sid_fp
);
fseek
(
smb
->
sid_fp
,
0
,
SEEK_SET
);
if
(
!
fread
(
idx
,
sizeof
(
idxrec_t
),
1
,
smb
->
sid_fp
))
{
sprintf
(
smb
->
last_error
,
"reading index"
);
return
(
-
2
);
}
return
(
0
);
}
/****************************************************************************/
/* Reads the last index record in the open message base */
/****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
src/smblib/smblib.h
+
2
−
0
View file @
3261f802
...
...
@@ -104,6 +104,7 @@ SMBEXPORT int SMBCALL smb_getstatus(smb_t* smb);
SMBEXPORT
int
SMBCALL
smb_putstatus
(
smb_t
*
smb
);
SMBEXPORT
int
SMBCALL
smb_unlocksmbhdr
(
smb_t
*
smb
);
SMBEXPORT
int
SMBCALL
smb_getmsgidx
(
smb_t
*
smb
,
smbmsg_t
*
msg
);
SMBEXPORT
int
SMBCALL
smb_getfirstidx
(
smb_t
*
smb
,
idxrec_t
*
idx
);
SMBEXPORT
int
SMBCALL
smb_getlastidx
(
smb_t
*
smb
,
idxrec_t
*
idx
);
SMBEXPORT
uint
SMBCALL
smb_getmsghdrlen
(
smbmsg_t
*
msg
);
SMBEXPORT
ulong
SMBCALL
smb_getmsgdatlen
(
smbmsg_t
*
msg
);
...
...
@@ -171,6 +172,7 @@ SMBEXPORT void SMBCALL smb_clearerr(FILE* fp);
#pragma aux smb_putstatus "_*"
#pragma aux smb_unlocksmbhdr "_*"
#pragma aux smb_getmsgidx "_*"
#pragma aux smb_getfirstidx "_*"
#pragma aux smb_getlastidx "_*"
#pragma aux smb_getmsghdrlen "_*"
#pragma aux smb_getmsgdatlen "_*"
...
...
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