mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- Update to 0.6.3
This commit is contained in:
parent
e5662c1da3
commit
d121825bfc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=216165
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= pxlib
|
||||
PORTVERSION= 0.6.2
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.6.3
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (pxlib-0.6.2.tar.gz) = be582272c84c03b79e00fc1546e0fb17
|
||||
SHA256 (pxlib-0.6.2.tar.gz) = 7e19209a26928b3d8a2c4c1431234824480982aa7b22218ecaa72a9b5bffd4db
|
||||
SIZE (pxlib-0.6.2.tar.gz) = 516967
|
||||
MD5 (pxlib-0.6.3.tar.gz) = 0742020854496fa757d7acbe6a895224
|
||||
SHA256 (pxlib-0.6.3.tar.gz) = 20ea3782d8a084e9d46677a7adf0303d346f431ec1547131cf2bca2a60586c08
|
||||
SIZE (pxlib-0.6.3.tar.gz) = 517332
|
||||
|
@ -1,18 +0,0 @@
|
||||
--- src/paradox.c.orig Sun Jun 4 21:38:12 2006
|
||||
+++ src/paradox.c Sun Jun 4 21:38:31 2006
|
||||
@@ -273,6 +273,7 @@
|
||||
pxstream_t *pxs;
|
||||
pxpindex_t *pindex;
|
||||
int blockcount, blocknumber, numrecords;
|
||||
+ TDataBlock datablockhead;
|
||||
|
||||
pxh = pxdoc->px_head;
|
||||
pxs = pxdoc->px_stream;
|
||||
@@ -337,7 +338,6 @@
|
||||
if(blocknumber != 0) {
|
||||
while(blocknumber > 0) {
|
||||
fprintf(stderr, "next blocknumber after creating primary index: %d\n", blocknumber);
|
||||
- TDataBlock datablockhead;
|
||||
if(get_datablock_head(pxdoc, pxs, blocknumber, &datablockhead) < 0) {
|
||||
px_error(pxdoc, PX_RuntimeError, _("Could not get head of data block nr. %d."), blocknumber);
|
||||
pxdoc->free(pxdoc, pindex);
|
@ -1,85 +0,0 @@
|
||||
--- src/px_io.c.orig Sun Dec 11 13:12:58 2005
|
||||
+++ src/px_io.c Sun Dec 11 13:13:26 2005
|
||||
@@ -346,82 +346,6 @@
|
||||
*/
|
||||
size_t px_mb_write(pxblob_t *p, pxstream_t *dummy, size_t len, void *buffer) {
|
||||
return(p->mb_stream->write(p->pxdoc, p->mb_stream, len, buffer));
|
||||
- pxdoc_t *pxdoc;
|
||||
- pxhead_t *pxh;
|
||||
- pxstream_t *pxs;
|
||||
- long pos;
|
||||
- int ret;
|
||||
- unsigned char *tmpbuf = NULL;
|
||||
- unsigned int blockslen, blockoffset;
|
||||
-
|
||||
- pxdoc = p->pxdoc;
|
||||
- pxh = pxdoc->px_head;
|
||||
- pxs = p->mb_stream;
|
||||
-
|
||||
- if (pxh->px_encryption == 0)
|
||||
- return pxs->write(pxdoc, pxs, len, buffer);
|
||||
-
|
||||
- pos = pxs->tell(pxdoc, pxs);
|
||||
- if (pos < 0) {
|
||||
- return pos;
|
||||
- }
|
||||
-
|
||||
- blockoffset = (pos >> BLOCKSIZEEXP) << BLOCKSIZEEXP;
|
||||
- /* We need to read at least chunk from the blockoffset till the
|
||||
- * desired postion and the data itself which has len bytes.
|
||||
- * e.g. if we want to read 20 bytes starting at position 300 in the
|
||||
- * file, we will need to read 44+20 bytes starting at position 256.
|
||||
- */
|
||||
- blockslen = len + pos - blockoffset;
|
||||
- /* Check if the end of the data is within a 2^BLOCKSIZEEXP bytes block.
|
||||
- * If that is the case, we will need to read the remainder of the
|
||||
- * 2^BLOCKSIZEEXP bytes block as well. In the above example, we
|
||||
- * will have to read 256 bytes instead of just 64.
|
||||
- */
|
||||
- if(blockslen & 0xff)
|
||||
- blockslen = ((blockslen >> BLOCKSIZEEXP) + 1) << BLOCKSIZEEXP;
|
||||
-
|
||||
- assert(blockslen >= len);
|
||||
- assert(blockoffset <= (unsigned long)pos);
|
||||
- assert((blockoffset+blockslen) >= (pos+len));
|
||||
-
|
||||
- ret = pxs->seek(pxdoc, pxs, blockoffset, SEEK_SET);
|
||||
- if (ret < 0) {
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- tmpbuf = (unsigned char *) malloc(blockslen);
|
||||
- if (tmpbuf == NULL) {
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
-
|
||||
- ret = pxs->read(pxdoc, pxs, blockslen, tmpbuf);
|
||||
- if (ret < 0) {
|
||||
- goto end;
|
||||
- }
|
||||
-
|
||||
- px_decrypt_mb_block(tmpbuf, tmpbuf, pxh->px_encryption, blockslen);
|
||||
- memcpy(tmpbuf + (pos - blockoffset), buffer, len);
|
||||
- px_encrypt_mb_block(tmpbuf, tmpbuf, pxh->px_encryption, blockslen);
|
||||
-
|
||||
- ret = pxs->seek(pxdoc, pxs, blockoffset, SEEK_SET);
|
||||
- if (ret < 0) {
|
||||
- return ret;
|
||||
- }
|
||||
- ret = pxs->write(pxdoc, pxs, blockslen, tmpbuf);
|
||||
- if (ret < 0) {
|
||||
- goto end;
|
||||
- }
|
||||
-
|
||||
- ret = pxs->seek(pxdoc, pxs, pos + len, SEEK_SET);
|
||||
- if (ret < 0) {
|
||||
- goto end;
|
||||
- }
|
||||
-
|
||||
- ret = len;
|
||||
-end:
|
||||
- free(tmpbuf);
|
||||
- return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user