Skip to content

Commit 3e0bd16

Browse files
committed
added const to a number of prototypes, some of the headers had windows line endings, bug fix in copying routines for cc
1 parent 7610fd8 commit 3e0bd16

22 files changed

+972
-969
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AUTOMAKE_OPTIONS = subdir-objects
22
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
3-
LIBRARY_VERSION = 1:1:0
3+
LIBRARY_VERSION = 1:2:0
44

55
lib_LTLIBRARIES = libdxcut.la libdxcutcc.la
66

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([dxcut], [0.5.0], [[email protected]],
1+
AC_INIT([dxcut], [0.5.1], [[email protected]],
22
[dxcut], [https://github.com/msg555/dxcut])
33
AM_INIT_AUTOMAKE
44
AC_PROG_CC()

dxcut/access_flags.h

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
/*
2-
Copyright (C) 2010 Mark Gordon
3-
4-
This program is free software; you can redistribute it and/or modify it under
5-
the terms of the GNU General Public License as published by the Free Software
6-
Foundation; either version 2 of the License, or (at your option) any later
7-
version.
8-
9-
This program is distributed in the hope that it will be useful, but WITHOUT ANY
10-
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11-
PARTICULAR PURPOSE. See the GNU General Public License for more details.
12-
13-
You should have received a copy of the GNU General Public License along with
14-
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15-
Place, Suite 330, Boston, MA 02111-1307 USA
16-
*/
17-
/*! \file access_flags.h
18-
*/
19-
#ifndef __DXCUT_ACCESS_FLAGS_H
20-
#define __DXCUT_ACCESS_FLAGS_H
21-
#ifdef __cplusplus
22-
extern "C" {
23-
#endif
24-
25-
/** \enum DexAccessFlags
26-
* \brief See the access_flags section of
27-
* http://www.netmite.com/android/mydroid/dalvik/docs/dex-format.html for flag
28-
* definitions.
29-
*/
30-
typedef enum DexAccessFlags {
31-
ACC_PUBLIC = 0x1,
32-
ACC_PRIVATE = 0x2,
33-
ACC_PROTECTED = 0x4,
34-
ACC_STATIC = 0x8,
35-
ACC_FINAL = 0x10,
36-
ACC_SYNCHRONIZED = 0x20,
37-
ACC_VOLATILE = 0x40,
38-
ACC_BRIDGE = 0x40,
39-
ACC_TRANSIENT = 0x80,
40-
ACC_VARARGS = 0x80,
41-
ACC_NATIVE = 0x100,
42-
ACC_INTERFACE = 0x200,
43-
ACC_ABSTRACT = 0x400,
44-
ACC_STRICT = 0x800,
45-
ACC_SYNTHETIC = 0x1000,
46-
ACC_ANNOTATION = 0x2000,
47-
ACC_ENUM = 0x4000,
48-
ACC_UNUSED = 0x8000,
49-
ACC_CONSTRUCTOR = 0x10000,
50-
ACC_DECLARED_SYNCHRONIZED = 0x20000
51-
} DexAccessFlags;
52-
53-
/** \fn char* dxc_access_flags_nice(DexAccessFlags flags)
54-
* \brief Returns a space separated test version of the access flags in the
55-
* form of a static buffer.
56-
*
57-
* TODO: can we make this thread safe?
58-
*/
59-
extern
60-
char* dxc_access_flags_nice(DexAccessFlags flags);
61-
62-
#ifdef __cplusplus
63-
}
64-
#endif
65-
#endif // __DXCUT_ACCESS_FLAGS_H
1+
/*
2+
Copyright (C) 2010 Mark Gordon
3+
4+
This program is free software; you can redistribute it and/or modify it under
5+
the terms of the GNU General Public License as published by the Free Software
6+
Foundation; either version 2 of the License, or (at your option) any later
7+
version.
8+
9+
This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License along with
14+
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15+
Place, Suite 330, Boston, MA 02111-1307 USA
16+
*/
17+
/*! \file access_flags.h
18+
*/
19+
#ifndef __DXCUT_ACCESS_FLAGS_H
20+
#define __DXCUT_ACCESS_FLAGS_H
21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
25+
/** \enum DexAccessFlags
26+
* \brief See the access_flags section of
27+
* http://www.netmite.com/android/mydroid/dalvik/docs/dex-format.html for flag
28+
* definitions.
29+
*/
30+
typedef enum DexAccessFlags {
31+
ACC_PUBLIC = 0x1,
32+
ACC_PRIVATE = 0x2,
33+
ACC_PROTECTED = 0x4,
34+
ACC_STATIC = 0x8,
35+
ACC_FINAL = 0x10,
36+
ACC_SYNCHRONIZED = 0x20,
37+
ACC_VOLATILE = 0x40,
38+
ACC_BRIDGE = 0x40,
39+
ACC_TRANSIENT = 0x80,
40+
ACC_VARARGS = 0x80,
41+
ACC_NATIVE = 0x100,
42+
ACC_INTERFACE = 0x200,
43+
ACC_ABSTRACT = 0x400,
44+
ACC_STRICT = 0x800,
45+
ACC_SYNTHETIC = 0x1000,
46+
ACC_ANNOTATION = 0x2000,
47+
ACC_ENUM = 0x4000,
48+
ACC_UNUSED = 0x8000,
49+
ACC_CONSTRUCTOR = 0x10000,
50+
ACC_DECLARED_SYNCHRONIZED = 0x20000
51+
} DexAccessFlags;
52+
53+
/** \fn char* dxc_access_flags_nice(DexAccessFlags flags)
54+
* \brief Returns a space separated test version of the access flags in the
55+
* form of a static buffer.
56+
*
57+
* TODO: can we make this thread safe?
58+
*/
59+
extern
60+
char* dxc_access_flags_nice(DexAccessFlags flags);
61+
62+
#ifdef __cplusplus
63+
}
64+
#endif
65+
#endif // __DXCUT_ACCESS_FLAGS_H

dxcut/annotation.h

Lines changed: 110 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,110 @@
1-
/*
2-
Copyright (C) 2010 Mark Gordon
3-
4-
This program is free software; you can redistribute it and/or modify it under
5-
the terms of the GNU General Public License as published by the Free Software
6-
Foundation; either version 2 of the License, or (at your option) any later
7-
version.
8-
9-
This program is distributed in the hope that it will be useful, but WITHOUT ANY
10-
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11-
PARTICULAR PURPOSE. See the GNU General Public License for more details.
12-
13-
You should have received a copy of the GNU General Public License along with
14-
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15-
Place, Suite 330, Boston, MA 02111-1307 USA
16-
*/
17-
/*! \file annotation.h
18-
* \brief Contains java annotation information
19-
*
20-
* Contains the classes for storing annotation information and an enumeration
21-
* with the possible annotation visibilities. Annotations that are stored
22-
* in a DexValue do not have associated visibilities and should have their
23-
* corresponding visibility field set to VISIBILITY_NONE.
24-
*/
25-
#ifndef __DXCUT_ANNOTATION_H
26-
#define __DXCUT_ANNOTATION_H
27-
#include <dxcut/dex.h>
28-
#include <dxcut/value.h>
29-
#ifdef __cplusplus
30-
extern "C" {
31-
#endif
32-
33-
typedef enum DexAnnotationVisibility {
34-
/// Annotation is only meant to be visible at compile time.
35-
VISIBILITY_BUILD = 0x00,
36-
/// Annotation is visible at runtime.
37-
VISIBILITY_RUNTIME = 0x01,
38-
/// Annotation is visible at runtime but only to the underlying system.
39-
VISIBILITY_SYSTEM = 0x02,
40-
/// If this annotation came from a DexValue it won't have a visibility
41-
/// associated with it.
42-
VISIBILITY_NONE = 0xFF
43-
} DexAnnotationVisibility;
44-
45-
46-
typedef struct {
47-
/// The name of the parameter. For annotations that contain one parameter this
48-
/// is "value".
49-
ref_str* name;
50-
/// The value associated with this parameter.
51-
DexValue value;
52-
} DexNameValuePair;
53-
54-
struct dex_annotation_t {
55-
/// Indicates the intended visibility of this annotation.
56-
DexAnnotationVisibility visibility;
57-
58-
/// Indicates the type of the element.
59-
ref_str* type;
60-
61-
/// A sentinel-terminated list of name value pair parameters for this
62-
/// annotation.
63-
DexNameValuePair* parameters;
64-
};
65-
66-
typedef struct dex_annotation_t DexAnnotation;
67-
68-
/** \fn void dxc_free_annotation(DexAnnotation* annotation)
69-
* \brief Frees all data allocated for this annotation. Does not attempt to
70-
* free the passed pointer.
71-
*/
72-
extern
73-
void dxc_free_annotation(DexAnnotation* annotation);
74-
75-
/** \fn int dxc_is_sentinel_annotation(DexAnnotation* annotation)
76-
* \brief Returns true if this annotation marks the end of an annotation list.
77-
*/
78-
extern
79-
int dxc_is_sentinel_annotation(DexAnnotation* annotation);
80-
81-
/** \fn void dxc_make_sentinel_annotation(DexAnnotation* annotation)
82-
* \brief Marks the passed annotation as the end of a list.
83-
*/
84-
extern
85-
void dxc_make_sentinel_annotation(DexAnnotation* annotation);
86-
87-
/** \fn void dxc_free_parameter(DexNameValuePair* parameter)
88-
* \brief Frees all data allocated for this name value pair.
89-
* Does not attempt to free the passed pointer.
90-
*/
91-
extern
92-
void dxc_free_parameter(DexNameValuePair* parameter);
93-
94-
/** \fn int dxc_is_sentinel_parameter(DexNameValuePair* parameter)
95-
* \brief Returns true if this name value pair marks the end of a
96-
* name value pair list.
97-
*/
98-
extern
99-
int dxc_is_sentinel_parameter(DexNameValuePair* parameter);
100-
101-
/** \fn void dxc_make_sentinel_parameter(DexNameValuePair* parameter)
102-
* \brief Marks the passed named value pair as the end of a list.
103-
*/
104-
extern
105-
void dxc_make_sentinel_parameter(DexNameValuePair* parameter);
106-
107-
#ifdef __cplusplus
108-
}
109-
#endif
110-
#endif // __DXCUT_ANNOTATION_H
1+
/*
2+
Copyright (C) 2010 Mark Gordon
3+
4+
This program is free software; you can redistribute it and/or modify it under
5+
the terms of the GNU General Public License as published by the Free Software
6+
Foundation; either version 2 of the License, or (at your option) any later
7+
version.
8+
9+
This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License along with
14+
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15+
Place, Suite 330, Boston, MA 02111-1307 USA
16+
*/
17+
/*! \file annotation.h
18+
* \brief Contains java annotation information
19+
*
20+
* Contains the classes for storing annotation information and an enumeration
21+
* with the possible annotation visibilities. Annotations that are stored
22+
* in a DexValue do not have associated visibilities and should have their
23+
* corresponding visibility field set to VISIBILITY_NONE.
24+
*/
25+
#ifndef __DXCUT_ANNOTATION_H
26+
#define __DXCUT_ANNOTATION_H
27+
#include <dxcut/dex.h>
28+
#include <dxcut/value.h>
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
32+
33+
typedef enum DexAnnotationVisibility {
34+
/// Annotation is only meant to be visible at compile time.
35+
VISIBILITY_BUILD = 0x00,
36+
/// Annotation is visible at runtime.
37+
VISIBILITY_RUNTIME = 0x01,
38+
/// Annotation is visible at runtime but only to the underlying system.
39+
VISIBILITY_SYSTEM = 0x02,
40+
/// If this annotation came from a DexValue it won't have a visibility
41+
/// associated with it.
42+
VISIBILITY_NONE = 0xFF
43+
} DexAnnotationVisibility;
44+
45+
46+
typedef struct {
47+
/// The name of the parameter. For annotations that contain one parameter this
48+
/// is "value".
49+
ref_str* name;
50+
/// The value associated with this parameter.
51+
DexValue value;
52+
} DexNameValuePair;
53+
54+
struct dex_annotation_t {
55+
/// Indicates the intended visibility of this annotation.
56+
DexAnnotationVisibility visibility;
57+
58+
/// Indicates the type of the element.
59+
ref_str* type;
60+
61+
/// A sentinel-terminated list of name value pair parameters for this
62+
/// annotation.
63+
DexNameValuePair* parameters;
64+
};
65+
66+
typedef struct dex_annotation_t DexAnnotation;
67+
68+
/** \fn void dxc_free_annotation(DexAnnotation* annotation)
69+
* \brief Frees all data allocated for this annotation. Does not attempt to
70+
* free the passed pointer.
71+
*/
72+
extern
73+
void dxc_free_annotation(DexAnnotation* annotation);
74+
75+
/** \fn int dxc_is_sentinel_annotation(DexAnnotation* annotation)
76+
* \brief Returns true if this annotation marks the end of an annotation list.
77+
*/
78+
extern
79+
int dxc_is_sentinel_annotation(const DexAnnotation* annotation);
80+
81+
/** \fn void dxc_make_sentinel_annotation(DexAnnotation* annotation)
82+
* \brief Marks the passed annotation as the end of a list.
83+
*/
84+
extern
85+
void dxc_make_sentinel_annotation(DexAnnotation* annotation);
86+
87+
/** \fn void dxc_free_parameter(DexNameValuePair* parameter)
88+
* \brief Frees all data allocated for this name value pair.
89+
* Does not attempt to free the passed pointer.
90+
*/
91+
extern
92+
void dxc_free_parameter(DexNameValuePair* parameter);
93+
94+
/** \fn int dxc_is_sentinel_parameter(DexNameValuePair* parameter)
95+
* \brief Returns true if this name value pair marks the end of a
96+
* name value pair list.
97+
*/
98+
extern
99+
int dxc_is_sentinel_parameter(const DexNameValuePair* parameter);
100+
101+
/** \fn void dxc_make_sentinel_parameter(DexNameValuePair* parameter)
102+
* \brief Marks the passed named value pair as the end of a list.
103+
*/
104+
extern
105+
void dxc_make_sentinel_parameter(DexNameValuePair* parameter);
106+
107+
#ifdef __cplusplus
108+
}
109+
#endif
110+
#endif // __DXCUT_ANNOTATION_H

0 commit comments

Comments
 (0)