summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-05-08 19:01:21 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-05-08 19:01:21 +0000
commit254566b1138ffe19fa087dc2a8133f71f3398dc0 (patch)
tree24b2c06b7872443b98fe83e90aeabbcb8ae45291
parente15adcd3cb6ad75e9635a61c23974eb7055673df (diff)
downloadrockbox-254566b1138ffe19fa087dc2a8133f71f3398dc0.tar.gz
rockbox-254566b1138ffe19fa087dc2a8133f71f3398dc0.zip
Cleanup in tools/: Remove unused VB scripts and fix properties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17421 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--tools/creative.h88
-rw-r--r--tools/hmac-sha1.h246
-rwxr-xr-xtools/mkinfo.pl2
-rwxr-xr-xtools/sapi5_init_tts.vbs29
-rwxr-xr-xtools/sapi5_stop_tts.vbs18
-rwxr-xr-xtools/sapi5_voice.vbs68
-rw-r--r--[-rwxr-xr-x]tools/sapi_voice.vbs0
-rw-r--r--tools/voicefont.h2
-rw-r--r--tools/wavtrim.h2
-rwxr-xr-x[-rw-r--r--]tools/wn2rdf.pl0
10 files changed, 170 insertions, 285 deletions
diff --git a/tools/creative.h b/tools/creative.h
index d8bfcd0b01..a4ca9ce2da 100644
--- a/tools/creative.h
+++ b/tools/creative.h
@@ -1,44 +1,44 @@
1/*************************************************************************** 1/***************************************************************************
2 * __________ __ ___. 2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2008 by Maurus Cuelenaere 10 * Copyright (C) 2008 by Maurus Cuelenaere
11 * 11 *
12 * All files in this archive are subject to the GNU General Public License. 12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement. 13 * See the file COPYING in the source tree root for full license agreement.
14 * 14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#ifndef CREATIVE_H_ 20#ifndef CREATIVE_H_
21#define CREATIVE_H_ 21#define CREATIVE_H_
22 22
23enum 23enum
24{ 24{
25 ZENVISIONM = 0, 25 ZENVISIONM = 0,
26 ZENVISIONM60 = 1, 26 ZENVISIONM60 = 1,
27 ZENVISION = 2, 27 ZENVISION = 2,
28 ZENV = 3, 28 ZENV = 3,
29 ZEN = 4 29 ZEN = 4
30}; 30};
31 31
32struct device_info 32struct device_info
33{ 33{
34 const char* cinf; /*Must be Unicode encoded*/ 34 const char* cinf; /*Must be Unicode encoded*/
35 const unsigned int cinf_size; 35 const unsigned int cinf_size;
36 const char* null; 36 const char* null;
37 const unsigned char* bootloader; 37 const unsigned char* bootloader;
38 const unsigned int bootloader_size; 38 const unsigned int bootloader_size;
39 const unsigned int memory_address; 39 const unsigned int memory_address;
40}; 40};
41 41
42int zvm_encode(char *iname, char *oname, int device); 42int zvm_encode(char *iname, char *oname, int device);
43 43
44#endif /*CREATIVE_H_*/ 44#endif /*CREATIVE_H_*/
diff --git a/tools/hmac-sha1.h b/tools/hmac-sha1.h
index b3969d6148..5652690686 100644
--- a/tools/hmac-sha1.h
+++ b/tools/hmac-sha1.h
@@ -1,123 +1,123 @@
1/* Taken from gnulib (http://savannah.gnu.org/projects/gnulib/) */ 1/* Taken from gnulib (http://savannah.gnu.org/projects/gnulib/) */
2/* Declarations of functions and data types used for SHA1 sum 2/* Declarations of functions and data types used for SHA1 sum
3 library functions. 3 library functions.
4 Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc. 4 Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
5 5
6 This program is free software; you can redistribute it and/or modify it 6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the 7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any 8 Free Software Foundation; either version 2, or (at your option) any
9 later version. 9 later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation, 17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 19
20#ifndef SHA1_H 20#ifndef SHA1_H
21#define SHA1_H 1 21#define SHA1_H 1
22 22
23#include <stdio.h> 23#include <stdio.h>
24#include <stdint.h> 24#include <stdint.h>
25 25
26/* Structure to save state of computation between the single steps. */ 26/* Structure to save state of computation between the single steps. */
27struct sha1_ctx 27struct sha1_ctx
28{ 28{
29 uint32_t A; 29 uint32_t A;
30 uint32_t B; 30 uint32_t B;
31 uint32_t C; 31 uint32_t C;
32 uint32_t D; 32 uint32_t D;
33 uint32_t E; 33 uint32_t E;
34 34
35 uint32_t total[2]; 35 uint32_t total[2];
36 uint32_t buflen; 36 uint32_t buflen;
37 uint32_t buffer[32]; 37 uint32_t buffer[32];
38}; 38};
39 39
40 40
41/* Initialize structure containing state of computation. */ 41/* Initialize structure containing state of computation. */
42extern void sha1_init_ctx (struct sha1_ctx *ctx); 42extern void sha1_init_ctx (struct sha1_ctx *ctx);
43 43
44/* Starting with the result of former calls of this function (or the 44/* Starting with the result of former calls of this function (or the
45 initialization function update the context for the next LEN bytes 45 initialization function update the context for the next LEN bytes
46 starting at BUFFER. 46 starting at BUFFER.
47 It is necessary that LEN is a multiple of 64!!! */ 47 It is necessary that LEN is a multiple of 64!!! */
48extern void sha1_process_block (const void *buffer, size_t len, 48extern void sha1_process_block (const void *buffer, size_t len,
49 struct sha1_ctx *ctx); 49 struct sha1_ctx *ctx);
50 50
51/* Starting with the result of former calls of this function (or the 51/* Starting with the result of former calls of this function (or the
52 initialization function update the context for the next LEN bytes 52 initialization function update the context for the next LEN bytes
53 starting at BUFFER. 53 starting at BUFFER.
54 It is NOT required that LEN is a multiple of 64. */ 54 It is NOT required that LEN is a multiple of 64. */
55extern void sha1_process_bytes (const void *buffer, size_t len, 55extern void sha1_process_bytes (const void *buffer, size_t len,
56 struct sha1_ctx *ctx); 56 struct sha1_ctx *ctx);
57 57
58/* Process the remaining bytes in the buffer and put result from CTX 58/* Process the remaining bytes in the buffer and put result from CTX
59 in first 20 bytes following RESBUF. The result is always in little 59 in first 20 bytes following RESBUF. The result is always in little
60 endian byte order, so that a byte-wise output yields to the wanted 60 endian byte order, so that a byte-wise output yields to the wanted
61 ASCII representation of the message digest. 61 ASCII representation of the message digest.
62 62
63 IMPORTANT: On some systems it is required that RESBUF be correctly 63 IMPORTANT: On some systems it is required that RESBUF be correctly
64 aligned for a 32 bits value. */ 64 aligned for a 32 bits value. */
65extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf); 65extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
66 66
67 67
68/* Put result from CTX in first 20 bytes following RESBUF. The result is 68/* Put result from CTX in first 20 bytes following RESBUF. The result is
69 always in little endian byte order, so that a byte-wise output yields 69 always in little endian byte order, so that a byte-wise output yields
70 to the wanted ASCII representation of the message digest. 70 to the wanted ASCII representation of the message digest.
71 71
72 IMPORTANT: On some systems it is required that RESBUF is correctly 72 IMPORTANT: On some systems it is required that RESBUF is correctly
73 aligned for a 32 bits value. */ 73 aligned for a 32 bits value. */
74extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf); 74extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
75 75
76 76
77/* Compute SHA1 message digest for bytes read from STREAM. The 77/* Compute SHA1 message digest for bytes read from STREAM. The
78 resulting message digest number will be written into the 20 bytes 78 resulting message digest number will be written into the 20 bytes
79 beginning at RESBLOCK. */ 79 beginning at RESBLOCK. */
80extern int sha1_stream (FILE *stream, void *resblock); 80extern int sha1_stream (FILE *stream, void *resblock);
81 81
82/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The 82/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
83 result is always in little endian byte order, so that a byte-wise 83 result is always in little endian byte order, so that a byte-wise
84 output yields to the wanted ASCII representation of the message 84 output yields to the wanted ASCII representation of the message
85 digest. */ 85 digest. */
86extern void *sha1_buffer (const char *buffer, size_t len, void *resblock); 86extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
87 87
88#endif 88#endif
89 89
90 90
91/* hmac.h -- hashed message authentication codes 91/* hmac.h -- hashed message authentication codes
92 Copyright (C) 2005 Free Software Foundation, Inc. 92 Copyright (C) 2005 Free Software Foundation, Inc.
93 93
94 This program is free software; you can redistribute it and/or modify 94 This program is free software; you can redistribute it and/or modify
95 it under the terms of the GNU General Public License as published by 95 it under the terms of the GNU General Public License as published by
96 the Free Software Foundation; either version 2, or (at your option) 96 the Free Software Foundation; either version 2, or (at your option)
97 any later version. 97 any later version.
98 98
99 This program is distributed in the hope that it will be useful, 99 This program is distributed in the hope that it will be useful,
100 but WITHOUT ANY WARRANTY; without even the implied warranty of 100 but WITHOUT ANY WARRANTY; without even the implied warranty of
101 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 101 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102 GNU General Public License for more details. 102 GNU General Public License for more details.
103 103
104 You should have received a copy of the GNU General Public License 104 You should have received a copy of the GNU General Public License
105 along with this program; if not, write to the Free Software Foundation, 105 along with this program; if not, write to the Free Software Foundation,
106 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 106 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
107 107
108/* Written by Simon Josefsson. */ 108/* Written by Simon Josefsson. */
109 109
110#ifndef HMAC_H 110#ifndef HMAC_H
111#define HMAC_H 1 111#define HMAC_H 1
112 112
113#include <stddef.h> 113#include <stddef.h>
114 114
115/* Compute Hashed Message Authentication Code with SHA-1, over BUFFER 115/* Compute Hashed Message Authentication Code with SHA-1, over BUFFER
116 data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the 116 data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the
117 output to pre-allocated 20 byte minimum RESBUF buffer. Return 0 on 117 output to pre-allocated 20 byte minimum RESBUF buffer. Return 0 on
118 success. */ 118 success. */
119int 119int
120hmac_sha1 (const void *key, size_t keylen, 120hmac_sha1 (const void *key, size_t keylen,
121 const void *in, size_t inlen, void *resbuf); 121 const void *in, size_t inlen, void *resbuf);
122 122
123#endif /* HMAC_H */ 123#endif /* HMAC_H */
diff --git a/tools/mkinfo.pl b/tools/mkinfo.pl
index ed2c2e695d..734e9ecc23 100755
--- a/tools/mkinfo.pl
+++ b/tools/mkinfo.pl
@@ -5,7 +5,7 @@
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/ 7# \/ \/ \/ \/ \/
8# $Id: configure 13215 2007-04-20 11:58:39Z bagder $ 8# $Id$
9# 9#
10# Purpose: extract and gather info from a build and put that in a standard 10# Purpose: extract and gather info from a build and put that in a standard
11# way in the output file. Meant to be put in rockbox zip package to help and 11# way in the output file. Meant to be put in rockbox zip package to help and
diff --git a/tools/sapi5_init_tts.vbs b/tools/sapi5_init_tts.vbs
deleted file mode 100755
index 466ee5ce71..0000000000
--- a/tools/sapi5_init_tts.vbs
+++ /dev/null
@@ -1,29 +0,0 @@
1'***************************************************************************
2' __________ __ ___.
3' Open \______ \ ____ ____ | | _\_ |__ _______ ___
4' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7' \/ \/ \/ \/ \/
8' $Id: sapi5_init_tts.vbs$
9'
10' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
11'
12' All files in this archive are subject to the GNU General Public License.
13' See the file COPYING in the source tree root for full license agreement.
14'
15' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16' KIND, either express or implied.
17'
18'***************************************************************************
19Dim oSpVoice, sVoice
20
21Set oSpVoice = CreateObject("SAPI.SpVoice")
22If Err.Number <> 0 Then
23 WScript.Echo "Error - could not get SpVoice object. " & _
24 "SAPI 5 not installed?"
25 Err.Clear
26 WScript.Quit 1
27End If
28
29WScript.Quit 0
diff --git a/tools/sapi5_stop_tts.vbs b/tools/sapi5_stop_tts.vbs
deleted file mode 100755
index eee149bf08..0000000000
--- a/tools/sapi5_stop_tts.vbs
+++ /dev/null
@@ -1,18 +0,0 @@
1'***************************************************************************
2' __________ __ ___.
3' Open \______ \ ____ ____ | | _\_ |__ _______ ___
4' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7' \/ \/ \/ \/ \/
8' $Id: sapi5_stop_tts.vbs$
9'
10' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
11'
12' All files in this archive are subject to the GNU General Public License.
13' See the file COPYING in the source tree root for full license agreement.
14'
15' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16' KIND, either express or implied.
17'
18'***************************************************************************
diff --git a/tools/sapi5_voice.vbs b/tools/sapi5_voice.vbs
deleted file mode 100755
index c37836afb4..0000000000
--- a/tools/sapi5_voice.vbs
+++ /dev/null
@@ -1,68 +0,0 @@
1'***************************************************************************
2' __________ __ ___.
3' Open \______ \ ____ ____ | | _\_ |__ _______ ___
4' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7' \/ \/ \/ \/ \/
8' $Id: sapi5_voice.vbs$
9'
10' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
11'
12' All files in this archive are subject to the GNU General Public License.
13' See the file COPYING in the source tree root for full license agreement.
14'
15' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16' KIND, either express or implied.
17'
18'***************************************************************************
19' Purpose: Make a voice clip file for the given text
20' Parameters: $0 - text to convert
21' $1 - file to write spoken text into (WAV format)
22
23
24
25'To be done:
26' - Somehow, persist oSpVoice across multiple clips to increase speed
27' - Allow user to override voice, speed and/or format (currently uses Control Panel defaults for voice/speed)
28' - Voice specific replacements/corrections for pronounciation (this should be at a higher level really)
29
30Const SSFMCreateForWrite = 3
31
32Const SPSF_8kHz16BitMono = 6
33Const SPSF_11kHz16BitMono = 10
34Const SPSF_12kHz16BitMono = 14
35Const SPSF_16kHz16BitMono = 18
36Const SPSF_22kHz16BitMono = 22
37Const SPSF_24kHz16BitMono = 26
38Const SPSF_32kHz16BitMono = 30
39Const SPSF_44kHz16BitMono = 34
40Const SPSF_48kHz16BitMono = 38
41
42Dim oSpVoice, oSpFS, nAudioFormat, sText, sOutputFile
43
44sText = Replace(WScript.Arguments(0), "\", "")
45sOutputFile = WScript.Arguments(1)
46nAudioFormat = SPSF_22kHz16BitMono 'Audio format to use, recommended settings:
47 '- for AT&T natural voices, use SPSF_32kHz16BitMono
48 '- for MS voices, use SPSF_22kHz16BitMono
49
50Set oSpVoice = CreateObject("SAPI.SpVoice")
51If Err.Number <> 0 Then
52 WScript.Echo "Error - could not get SpVoice object. " & _
53 "SAPI 5 not installed?"
54 Err.Clear
55 WScript.Quit 1
56End If
57
58Set oSpFS = CreateObject("SAPI.SpFileStream")
59oSpFS.Format.Type = nAudioFormat
60oSpFS.Open sOutputFile, SSFMCreateForWrite, False
61Set oSpVoice.AudioOutputStream = oSpFS
62oSpVoice.Speak sText
63oSpFS.Close
64
65Set oSpFS = Nothing
66Set oSpVoice = Nothing
67Set oArgs = Nothing
68WScript.Quit 0
diff --git a/tools/sapi_voice.vbs b/tools/sapi_voice.vbs
index 772798b66e..772798b66e 100755..100644
--- a/tools/sapi_voice.vbs
+++ b/tools/sapi_voice.vbs
diff --git a/tools/voicefont.h b/tools/voicefont.h
index 23e3f32eb7..9db6bcaf39 100644
--- a/tools/voicefont.h
+++ b/tools/voicefont.h
@@ -5,7 +5,7 @@
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id: voicefont.h 15675 2007-11-18 22:01:31Z amiconn $ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2004 by Jörg Hohensohn 10 * Copyright (C) 2004 by Jörg Hohensohn
11 * 11 *
diff --git a/tools/wavtrim.h b/tools/wavtrim.h
index 314c842536..46c8ff871b 100644
--- a/tools/wavtrim.h
+++ b/tools/wavtrim.h
@@ -5,7 +5,7 @@
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id: wavtrim.h 14229 2007-08-07 10:21:03Z linus $ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2004 by Jörg Hohensohn 10 * Copyright (C) 2004 by Jörg Hohensohn
11 * 11 *
diff --git a/tools/wn2rdf.pl b/tools/wn2rdf.pl
index 2fff87d66b..2fff87d66b 100644..100755
--- a/tools/wn2rdf.pl
+++ b/tools/wn2rdf.pl