Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
80a9435e
Commit
80a9435e
authored
Jul 29, 2009
by
Ivan Donchevskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
few fixes in TableBlockStorage and CycleStorage
parent
edd5b572
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
15 deletions
+6
-15
JrnTest.cc
Utilities/JrnTests/JrnTest.cc
+0
-1
Storages.h
include/Storages.h
+1
-3
CycleStorage.cc
src/Various/CycleStorage.cc
+4
-6
TableBlockStorage.cc
src/Various/TableBlockStorage.cc
+1
-5
No files found.
Utilities/JrnTests/JrnTest.cc
View file @
80a9435e
...
...
@@ -224,7 +224,6 @@ void testJournal2(void)
delete
j
;
}
int
main
(
int
args
,
char
**
argv
)
{
//testTable1();
...
...
include/Storages.h
View file @
80a9435e
...
...
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include "UniXML.h"
...
...
@@ -100,9 +101,6 @@ class TableBlockStorage
bool
KeyCompare
(
int
i
,
void
*
key
);
void
*
KeyPointer
(
int
num
);
void
*
ValPointer
(
int
num
);
/*public:
FILE *file;
int cur_block,inf_size;*/
};
class
CycleStorage
...
...
src/Various/CycleStorage.cc
View file @
80a9435e
...
...
@@ -28,10 +28,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Storages.h"
CycleStorage
::
CycleStorage
()
...
...
@@ -86,7 +82,7 @@ bool CycleStorage::Open(const char* name, int inf_sz, int sz, int seek)
return
false
;
}
if
((
csa
->
size
!=
((
sz
-
sizeof
(
CycleStorageAttr
))
/
(
sizeof
(
CycleStorageElem
)
+
inf_sz
)))
||
(
csa
->
inf_size
!=
inf_sz
)
||
(
csa
->
seekpos
!=
seek
))
if
((
csa
->
size
!=
((
sz
-
sizeof
(
CycleStorageAttr
))
/
(
sizeof
(
CycleStorageElem
)
+
inf_sz
)))
||
(
csa
->
inf_size
!=
inf_sz
)
||
(
csa
->
seekpos
!=
seek
))
{
delete
csa
;
return
false
;
...
...
@@ -350,7 +346,9 @@ bool CycleStorage::DelAllRows()
void
*
CycleStorage
::
ViewRow
(
int
num
,
void
*
str
)
{
int
j
=
(
head
+
num
)
%
size
;
if
((
file
==
NULL
)
||
(
num
>
size
))
return
0
;
if
((
file
==
NULL
)
||
(
num
>=
size
))
return
0
;
if
((
head
!=
tail
+
1
)
&&
(
num
>
tail
))
return
0
;
CycleStorageElem
*
jrn
=
(
CycleStorageElem
*
)
new
char
[
full_size
];
fseek
(
file
,
seekpos
+
j
*
full_size
,
0
);
fread
(
jrn
,
full_size
,
1
,
file
);
...
...
src/Various/TableBlockStorage.cc
View file @
80a9435e
...
...
@@ -28,10 +28,6 @@
, ,
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Storages.h"
#define block_begin -5
...
...
@@ -318,7 +314,7 @@ void* TableBlockStorage::FindKeyValue(void* key, void* val)
return
val
;
}
}
return
false
;
return
0
;
}
int
TableBlockStorage
::
GetCurBlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment