Skip to content

Commit c931e57

Browse files
authoredFeb 28, 2017
Move java/ to java/org/brotli/ to fix sources.jar structure (google#517)
Also added man pages to `docs/`
1 parent aaac88a commit c931e57

30 files changed

+1128
-7
lines changed
 

‎docs/decode.h.3

+408
Large diffs are not rendered by default.

‎docs/encode.h.3

+592
Large diffs are not rendered by default.

‎docs/types.h.3

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
.TH "types.h" 3 "Tue Feb 28 2017" "Brotli" \" -*- nroff -*-
2+
.ad l
3+
.nh
4+
.SH NAME
5+
types.h \- Common types used in decoder and encoder API\&.
6+
7+
.SH SYNOPSIS
8+
.br
9+
.PP
10+
.SS "Macros"
11+
12+
.in +1c
13+
.ti -1c
14+
.RI "#define \fBBROTLI_BOOL\fP int"
15+
.br
16+
.RI "\fIA portable \fCbool\fP replacement\&. \fP"
17+
.ti -1c
18+
.RI "#define \fBBROTLI_FALSE\fP 0"
19+
.br
20+
.RI "\fIPortable \fCfalse\fP replacement\&. \fP"
21+
.ti -1c
22+
.RI "#define \fBBROTLI_TRUE\fP 1"
23+
.br
24+
.RI "\fIPortable \fCtrue\fP replacement\&. \fP"
25+
.ti -1c
26+
.RI "#define \fBTO_BROTLI_BOOL\fP(X) (!!(X) ? \fBBROTLI_TRUE\fP : \fBBROTLI_FALSE\fP)"
27+
.br
28+
.RI "\fI\fCbool\fP to \fBBROTLI_BOOL\fP conversion macros\&. \fP"
29+
.in -1c
30+
.SS "Typedefs"
31+
32+
.in +1c
33+
.ti -1c
34+
.RI "typedef void *(* \fBbrotli_alloc_func\fP) (void *opaque, size_t size)"
35+
.br
36+
.RI "\fIAllocating function pointer type\&. \fP"
37+
.ti -1c
38+
.RI "typedef void(* \fBbrotli_free_func\fP) (void *opaque, void *address)"
39+
.br
40+
.RI "\fIDeallocating function pointer type\&. \fP"
41+
.in -1c
42+
.SH "Detailed Description"
43+
.PP
44+
Common types used in decoder and encoder API\&.
45+
46+
47+
.SH "Macro Definition Documentation"
48+
.PP
49+
.SS "#define BROTLI_BOOL int"
50+
51+
.PP
52+
A portable \fCbool\fP replacement\&. \fBBROTLI_BOOL\fP is a 'documentation' type: actually it is \fCint\fP, but in API it denotes a type, whose only values are \fBBROTLI_TRUE\fP and \fBBROTLI_FALSE\fP\&.
53+
.PP
54+
\fBBROTLI_BOOL\fP values passed to Brotli should either be \fBBROTLI_TRUE\fP or \fBBROTLI_FALSE\fP, or be a result of \fBTO_BROTLI_BOOL\fP macros\&.
55+
.PP
56+
\fBBROTLI_BOOL\fP values returned by Brotli should not be tested for equality with \fCtrue\fP, \fCfalse\fP, \fBBROTLI_TRUE\fP, \fBBROTLI_FALSE\fP, but rather should be evaluated, for example:
57+
.PP
58+
.nf
59+
if (SomeBrotliFunction(encoder, BROTLI_TRUE) &&
60+
!OtherBrotliFunction(decoder, BROTLI_FALSE)) {
61+
bool x = !!YetAnotherBrotliFunction(encoder, TO_BROLTI_BOOL(2 * 2 == 4));
62+
DoSomething(x);
63+
}
64+
65+
.fi
66+
.PP
67+
68+
.SS "#define BROTLI_FALSE 0"
69+
70+
.PP
71+
Portable \fCfalse\fP replacement\&.
72+
.SS "#define BROTLI_TRUE 1"
73+
74+
.PP
75+
Portable \fCtrue\fP replacement\&.
76+
.SS "#define TO_BROTLI_BOOL(X) (!!(X) ? \fBBROTLI_TRUE\fP : \fBBROTLI_FALSE\fP)"
77+
78+
.PP
79+
\fCbool\fP to \fBBROTLI_BOOL\fP conversion macros\&.
80+
.SH "Typedef Documentation"
81+
.PP
82+
.SS "typedef void*(* brotli_alloc_func) (void *opaque, size_t size)"
83+
84+
.PP
85+
Allocating function pointer type\&.
86+
.PP
87+
\fBParameters:\fP
88+
.RS 4
89+
\fIopaque\fP custom memory manager handle provided by client
90+
.br
91+
\fIsize\fP requested memory region size; can not be \fC0\fP
92+
.RE
93+
.PP
94+
\fBReturns:\fP
95+
.RS 4
96+
\fC0\fP in the case of failure
97+
.PP
98+
a valid pointer to a memory region of at least \fCsize\fP bytes long otherwise
99+
.RE
100+
.PP
101+
102+
.SS "typedef void(* brotli_free_func) (void *opaque, void *address)"
103+
104+
.PP
105+
Deallocating function pointer type\&. This function \fBSHOULD\fP do nothing if \fCaddress\fP is \fC0\fP\&.
106+
.PP
107+
\fBParameters:\fP
108+
.RS 4
109+
\fIopaque\fP custom memory manager handle provided by client
110+
.br
111+
\fIaddress\fP memory region pointer returned by \fBbrotli_alloc_func\fP, or \fC0\fP
112+
.RE
113+
.PP
114+
115+
.SH "Author"
116+
.PP
117+
Generated automatically by Doxygen for Brotli from the source code\&.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎java/dec/pom.xml ‎java/org/brotli/dec/pom.xml

+8-4
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414
<name>${project.groupId}:${project.artifactId}</name>
1515

1616
<build>
17-
<sourceDirectory>.</sourceDirectory>
18-
<testSourceDirectory>.</testSourceDirectory>
17+
<sourceDirectory>../../..</sourceDirectory>
18+
<testSourceDirectory>../../..</testSourceDirectory>
1919
<plugins>
2020
<plugin>
2121
<groupId>org.apache.maven.plugins</groupId>
2222
<artifactId>maven-compiler-plugin</artifactId>
2323
<configuration>
24+
<includes>
25+
<include>**/dec/*.java</include>
26+
</includes>
2427
<excludes>
2528
<exclude>**/*Test*.java</exclude>
2629
</excludes>
2730
<testIncludes>
28-
<include>**/*Test*.java</include>
31+
<include>**/dec/*Test*.java</include>
2932
</testIncludes>
3033
</configuration>
3134
</plugin>
@@ -42,7 +45,7 @@
4245
</goals>
4346
<configuration>
4447
<includes>
45-
<include>**/*.java</include>
48+
<include>**/dec/*.java</include>
4649
</includes>
4750
<excludes>
4851
<exclude>**/*Test*.java</exclude>
@@ -63,6 +66,7 @@
6366
<goal>jar</goal>
6467
</goals>
6568
<configuration>
69+
<sourcepath>.</sourcepath>
6670
<sourceFileExcludes>
6771
<exclude>**/*Test*.java</exclude>
6872
</sourceFileExcludes>

‎java/integration/BUILD ‎java/org/brotli/integration/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
java_library(
55
name = "bundle_checker_lib",
66
srcs = ["BundleChecker.java"],
7-
deps = ["//java/dec:lib"],
7+
deps = ["//java/org/brotli/dec:lib"],
88
)
99

1010
java_binary(
@@ -15,7 +15,7 @@ java_binary(
1515

1616
java_test(
1717
name = "bundle_checker_data_test",
18-
args = ["java/integration/test_data.zip"],
18+
args = ["java/org/brotli/integration/test_data.zip"],
1919
data = ["test_data.zip"],
2020
main_class = "org.brotli.integration.BundleChecker",
2121
use_testrunner = 0,
@@ -26,7 +26,7 @@ java_test(
2626
name = "bundle_checker_fuzz_test",
2727
args = [
2828
"-s",
29-
"java/integration/fuzz_data.zip"
29+
"java/org/brotli/integration/fuzz_data.zip"
3030
],
3131
data = ["fuzz_data.zip"],
3232
main_class = "org.brotli.integration.BundleChecker",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.