more organization
This commit is contained in:
parent
1f7a101e6c
commit
690978a294
|
@ -1,3 +1,4 @@
|
|||
a.out
|
||||
mp3
|
||||
huffcv.awk
|
||||
old
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
### (it is true)
|
||||
|
||||
# files
|
||||
- dat.h: miscellaneous tables and constants needed by the library
|
||||
- huffman.h: generated huffman table
|
||||
- main.c: test application for the library
|
||||
- mp3.c: library code
|
||||
- mp3.h: library header, include this in client code
|
||||
- inc: includes
|
||||
+ dat.h: miscellaneous tables and constants needed by the library
|
||||
+ huffman.h: generated huffman table
|
||||
+ mp3.h: library header, include this in client code
|
||||
- scr: scripts unneeded to use the library, provided for reference purposes
|
||||
+ huff: wrapper for huffcvt, generating huffman tables copied to the clipboard from the mp3 specification
|
||||
+ scr/huffcvt.c: changes huffman string format to c array
|
||||
|
|
3
huff
3
huff
|
@ -1,3 +0,0 @@
|
|||
echo -e ", {\t\t\t\t\t\t\t// $1"
|
||||
eval `wl-paste|sed 's/^/\.\/huffcvt /g;s/$/;/g'`
|
||||
echo -ne '\t}'
|
16
huffcvt.c
16
huffcvt.c
|
@ -1,16 +0,0 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned long btoi(char* s) {
|
||||
unsigned long r = 0;
|
||||
int l = strlen(s) - 1;
|
||||
for(int i = l; i >= 0; i--) {
|
||||
r <<= 1;
|
||||
r |= (s[l-i]-'0');
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
printf("\t\t{%s,%s,%s,%i},\n", argv[1], argv[2], argv[3], btoi(argv[4]));
|
||||
}
|
2
main.c
2
main.c
|
@ -1,4 +1,4 @@
|
|||
#include "mp3.h"
|
||||
#include <mp3.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue