Skip to content

Commit fe7005e

Browse files
committed
Added source code of modules: opkg and ini
1 parent 82afa50 commit fe7005e

60 files changed

Lines changed: 58547 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/ini/Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# libini module for DreamShell
3+
# Copyright (C) 2013 SWAT
4+
#
5+
6+
TARGET_NAME = ini
7+
8+
OBJS = module.o
9+
LIBS = -lini
10+
DBG_LIBS = -lds
11+
EXPORTS_FILE = exports.txt
12+
13+
VER_MAJOR = 1
14+
VER_MINOR = 0
15+
VER_MICRO = 0
16+
17+
all: rm-elf
18+
19+
config:
20+
cd libini && ./conf.sh
21+
22+
library:
23+
cd libini && make
24+
25+
include ../../sdk/Makefile.loadable
26+
27+
rm-elf:
28+
-rm -f $(TARGET)
29+
-rm -f $(TARGET_LIB)
30+
31+
install: $(TARGET) $(TARGET_LIB) opkg
32+
-rm $(DS_BUILD)/modules/$(TARGET)
33+
-rm $(DS_SDK)/lib/$(TARGET_LIB)
34+
cp $(TARGET) $(DS_BUILD)/modules/$(TARGET)
35+
cp $(TARGET_LIB) $(DS_SDK)/lib/$(TARGET_LIB)
36+
37+
38+

modules/ini/default.desktop

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Name=ini
3+
Type=Application
4+
Exec=module -o -f %f
5+
Comment=libini library
6+
Terminal=false
7+
Categories=applications
8+
MimeType=application/ini

modules/ini/exports.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ini_open
2+
ini_close
3+
ini_flush
4+
ini_delete
5+
ini_locateKey
6+
ini_locateHeading
7+
ini_deleteKey
8+
ini_deleteHeading
9+
ini_currentKey
10+
ini_currentHeading
11+
ini_dataLength
12+
ini_readString
13+
ini_writeString
14+
ini_readInt
15+
ini_readLong
16+
ini_readDouble
17+
ini_readBool
18+
ini_writeInt
19+
ini_writeLong
20+
ini_writeDouble
21+
ini_writeBool
22+
ini_append
23+
ini_listLength
24+
ini_listDelims
25+
ini_listIndex

modules/ini/ini.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5

modules/ini/libini/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simon White

modules/ini/libini/COPYING

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

modules/ini/libini/ChangeLog

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
Libini V1.10 Release 2:
2+
3+
Fixed:
4+
5+
* Make all ini modifing calls fail for read only files.
6+
7+
* Fix strtrim to put null character in correct place
8+
9+
Karel Vanroye <kva@melexis.com>:
10+
11+
Fixed:
12+
13+
* ini_readInt, ini_readDouble and ini_readLong returns zero
14+
only if succesful conversion is done.
15+
16+
* libini.spec.in: make it compactible with Red Hat 5.2 rpm 2.5.5
17+
18+
Changes:
19+
20+
* ini_readBool true has now synonym yes, on; false has no, off
21+
22+
Added:
23+
24+
* Returning of currently selected heading and key name using
25+
ini_currentHeading and ini_currentKey.
26+
27+
28+
Libini V1.10 Release 1:
29+
30+
Fixed:
31+
32+
* Freeing of memory on heading creation errors.
33+
34+
* A data of the following format nolonger returns the comment
35+
as part of the data:
36+
37+
key=data ;comment
38+
39+
* First key in an anonymous section starting right at the start
40+
of the file is nolonger ignored.
41+
42+
* Fix ini_append and ini_store to nolonger crash if a heading
43+
was not previously located.
44+
45+
* Providing ini_open a NULL for comment is now treated as no
46+
comment (instead of crashing).
47+
48+
Changes:
49+
50+
* POTENTIAL INCOMPATIBILITY
51+
By default key/heading searches are now performed without
52+
case sensitivity. Pass the additional character 'i' in
53+
mode to ini_open to obtain old behaviour.
54+
55+
* By default backups are nolonger kept. Pass the additional
56+
character 'b' in mode to ini_open to obtain old behaviour.
57+
58+
* Swig module naming to make it more consistent across
59+
languages. To use swig to generate support for another
60+
language use:
61+
62+
swig -<lang> -module <lang>ini -o libini_<lang>.c libini.h
63+
64+
e.g.
65+
66+
swig -perl -module perlini -o libini_perl.c libini.h
67+
68+
Then compile that file and create a library called
69+
lib<lang>ini that depends on the library libini.
70+
71+
72+
Libini V1.9 Release 1:
73+
74+
Fixed:
75+
76+
*ini_open nolonger wrongly keeps input file open.
77+
78+
*Cleanup after new file creation check. This prevents
79+
operations on an already closed file.
80+
81+
*The following is nolonger processed as two keys:
82+
83+
key1=key2=data
84+
85+
*Simultaneous ini_open calls from different threads nolonger
86+
gives corrupted results. Note that you cannot access the
87+
same INI file from multiple threads unless a mutex lock
88+
is placed around all the relevant libini calls.
89+
90+
Modified:
91+
92+
*INI parser to support multiple character comments. The
93+
passed in comment string to ini_open is now used when
94+
processing the file. Comments are only recognised if they
95+
are at the beginning of a newline, preceeded by one
96+
character of whitespace and match the entire string passed
97+
into ini_open.
98+
99+
Added:
100+
101+
*Bool data type.
102+
103+
104+
Libini V1.8 Release 2:
105+
106+
Re-added ini_setBuffer for scripting languages which was
107+
accidently removed.
108+
109+
110+
Libini V1.8 Release 1:
111+
112+
Fixed:
113+
114+
*Different build options to reduce code size.
115+
116+
*Temporary files being left sometimes.
117+
118+
*ini_readDouble now reads double precision values from
119+
the INI file.
120+
121+
Modified:
122+
123+
*ini_open & ini_new functions have been combined into a
124+
single function called ini_open with extra parameters.
125+
The function now takes a filename, access mode and
126+
comment character(s). Access mode "w" is equivalent
127+
to the old ini_new and "a" is equivalent to the old
128+
ini_open. The comment character(s) should currently
129+
be passed in as either "#" or ";". Other comment
130+
strings are not supported at this time. Note that only
131+
one comment type is supported in the same file!
132+
133+
*ini_deleteAll renamed to ini_delete.
134+
135+
Added:
136+
137+
*ini_append: Allows two INI files to be combined. Keys
138+
from the source INI file will overwrite keys in the
139+
destination.
140+
141+
142+
Libini1 V1.7 Release 1:
143+
144+
Various Fixes:
145+
146+
*Fixed ini_new so correctly creates a new file if one dosen't
147+
exist.
148+
149+
*Doing an ini_flush no longer trashes the current heading/key
150+
you had previously located.
151+
152+
*If all section and keys have been removed the INI file is
153+
now deleted.
154+
155+
*ini_flush with no changes made to the file nolonger deletes
156+
the ini file descriptor thus causing the next ini_* call to
157+
perform a illegal operation/seg fault.
158+
159+
*ini_deleteHeading now works.
160+
161+
Added:
162+
163+
*ini_deleteAll to remove all section and keys
164+
165+
166+
Libini1 V1.6 Release 3:
167+
168+
*Tested with Visual Basic and added appropriate bas module.
169+
170+
*Removed ini_listIndexLength. When ini_listDelims is used
171+
ini_dataLength now returns the value normally provided
172+
by ini_listIndexLength.
173+
174+
175+
libini1 Version 1.6
176+
177+
Initial Sourceforge Release.

0 commit comments

Comments
 (0)