Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apk-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Adélie Linux
apk-tools
Commits
aff33e80
Verified
Commit
aff33e80
authored
Oct 13, 2019
by
Max Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: *include* missing files...
parent
460c47f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
2 deletions
+64
-2
Makefile
include/Makefile
+5
-0
blob.h
include/apk/blob.h
+57
-0
version.h
include/apk/version.h
+2
-2
No files found.
include/Makefile
0 → 100644
View file @
aff33e80
install-headers-y
:=
$(INSTALLDIR)
$(DESTDIR)$(INCDIR)
/apk
&&
\
$(INSTALL)
-m644
include/apk/
*
.h
$(DESTDIR)$(INCDIR)
/apk
install
:
$
(
install-headers-y
)
include/apk/blob.h
0 → 100644
View file @
aff33e80
/* apk_blob.h - Alpine Package Keeper (APK)
*
* Copyright (C) 2005-2008 Natanael Copa <n@tanael.org>
* Copyright (C) 2008-2011 Timo Teräs <timo.teras@iki.fi>
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. See http://www.gnu.org/ for details.
*/
#ifndef APK_BLOB_H
#define APK_BLOB_H
#include <ctype.h>
#include <string.h>
typedef
const
unsigned
char
*
apk_spn_match
;
typedef
unsigned
char
apk_spn_match_def
[
256
/
8
];
struct
apk_blob
{
long
len
;
char
*
ptr
;
};
typedef
struct
apk_blob
apk_blob_t
;
extern
apk_blob_t
apk_null_blob
;
#define BLOB_FMT "%.*s"
#define BLOB_PRINTF(b) (int)(b).len, (b).ptr
#define APK_BLOB_IS_NULL(blob) ((blob).ptr == NULL)
#define APK_BLOB_NULL ((apk_blob_t){0, NULL})
#define APK_BLOB_ERROR(err) ((apk_blob_t){err, NULL})
#define APK_BLOB_BUF(buf) ((apk_blob_t){sizeof(buf), (char *)(buf)})
#define APK_BLOB_CSUM(csum) ((apk_blob_t){(csum).type, (char *)(csum).data})
#define APK_BLOB_STRUCT(s) ((apk_blob_t){sizeof(s), (char*)&(s)})
#define APK_BLOB_PTR_LEN(beg,len) ((apk_blob_t){(len), (beg)})
#define APK_BLOB_PTR_PTR(beg,end) APK_BLOB_PTR_LEN((beg),(end)-(beg)+1)
static
inline
apk_blob_t
APK_BLOB_STR
(
const
char
*
str
)
{
if
(
str
==
NULL
)
return
APK_BLOB_NULL
;
return
((
apk_blob_t
){
strlen
(
str
),
(
void
*
)(
str
)});
}
static
inline
apk_blob_t
apk_blob_trim
(
apk_blob_t
blob
)
{
apk_blob_t
b
=
blob
;
while
(
b
.
len
>
0
&&
isspace
(
b
.
ptr
[
b
.
len
-
1
]))
b
.
len
--
;
return
b
;
}
#endif
include/apk/version.h
View file @
aff33e80
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* Copyright (C) 2008-2011 Timo Teräs <timo.teras@iki.fi>
* Copyright (C) 2008-2011 Timo Teräs <timo.teras@iki.fi>
* All rights reserved.
* All rights reserved.
*
*
* This program is free software; you can redistribute it and/or modify it
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. See http://www.gnu.org/ for details.
* by the Free Software Foundation. See http://www.gnu.org/ for details.
*/
*/
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#ifndef APK_VERSION_H
#ifndef APK_VERSION_H
#define APK_VERSION_H
#define APK_VERSION_H
#include
"apk_blob.h"
#include
<apk/blob.h>
#define APK_VERSION_UNKNOWN 0
#define APK_VERSION_UNKNOWN 0
#define APK_VERSION_EQUAL 1
#define APK_VERSION_EQUAL 1
...
...
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