projects
/
jump.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dol: fix shm_t contain the shm-buffers
[jump.git]
/
dol
/
src
/
dol
/
visitor
/
epiphany
/
EpiphanyVisitor.java
diff --git
a/dol/src/dol/visitor/epiphany/EpiphanyVisitor.java
b/dol/src/dol/visitor/epiphany/EpiphanyVisitor.java
index 2c0c642a5a0b173c44276cafaf668f9d815942e8..5a053ca424e84a289462d5bd141750dd49b7f2ee 100644
(file)
--- a/
dol/src/dol/visitor/epiphany/EpiphanyVisitor.java
+++ b/
dol/src/dol/visitor/epiphany/EpiphanyVisitor.java
@@
-264,23
+264,29
@@
public class EpiphanyVisitor extends PNVisitor {
File fTemplate = new File(template);
copyFile(fTemplate, fFilename);
File fTemplate = new File(template);
copyFile(fTemplate, fFilename);
- /* generate replacement string */
+ /* generate replacement strings */
+ String shmBufTypes = "";
String shmBufs = "";
for(EpiphanyBuffer buf : _buffers) {
if("shm".equals(buf.type)) {
String shmBufs = "";
for(EpiphanyBuffer buf : _buffers) {
if("shm".equals(buf.type)) {
- shmBufs +=
+ shmBuf
Type
s +=
"\ntypedef struct {\n" +
"\tuint32_t rp;\n" +
"\tuint32_t wp;\n" +
"\tuint32_t size;\n" +
"\tchar buf[" + buf.size + "];\n" +
"} PACKED buf" + buf.shmIndex + "_t;\n";
"\ntypedef struct {\n" +
"\tuint32_t rp;\n" +
"\tuint32_t wp;\n" +
"\tuint32_t size;\n" +
"\tchar buf[" + buf.size + "];\n" +
"} PACKED buf" + buf.shmIndex + "_t;\n";
+
+ shmBufs +=
+ "\tbuf" + buf.shmIndex + "_t" +
+ "\tbuf" + buf.shmIndex + ";\n";
}
}
/* do the replace */
Sed sed = new Sed();
}
}
/* do the replace */
Sed sed = new Sed();
- sed.sed(filename, "@@SHM_BUF_STRUCTS@@", shmBufs);
+ sed.sed(filename, "@@SHM_BUF_STRUCTS@@", shmBufTypes);
+ sed.sed(filename, "@@SHM_BUFS@@", shmBufs);
System.out.println("done!");
}
System.out.println("done!");
}