Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b
Parent Directory
(gnuradio)
Kludge Summary of gnuradio/gr-run-waveform
| Total Kludges |
9 |
| Total Subdirs |
0 |
All Directories within gnuradio/gr-run-waveform
All Files within gnuradio/gr-run-waveform
Kludge Snippets in gnuradio/gr-run-waveform
gnuradio/gr-run-waveform/test_xyzzy.cc — 1
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
aef7d16d8752f3e97a6d1d5e64399c498bce5123 |
199 } else {
200 cout << "FAILED: xyzzy_init()" << endl;
201 }
202
203 // Does a file with name 'filename' exist in magic filesystem?
204 if (xyzzy_file_exists("srfi/srfi-35.scm")) {
205 cout << "FAILED: xyzzy_file_exists(shouldn't exist)" << endl;
206 } else {
207 cout << "PASSED: xyzzy_file_exists(shouldn't exist)" << endl;
gnuradio/gr-run-waveform/test_xyzzy.cc — 2
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
b68acf9988c51bc8afb91ab80569aad89b70d4dc |
206 } else {
207 cout << "PASSED: xyzzy_file_exists(shouldn't exist)" << endl;
208 }
209
210 // Does a file with name 'filename' exist in magic filesystem?
211 if (xyzzy_file_exists("/-xyzzy-/srfi/srfi-35.scm")) {
212 cout << "PASSED: xyzzy_file_exists(should exist)" << endl;
213 } else {
214 cout << "FAILED: xyzzy_file_exists(should exist)" << endl;
gnuradio/gr-run-waveform/test_xyzzy.cc — 3
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
c5acc6ed14484d010453209895b2bd8ee63a634d |
213 } else {
214 cout << "FAILED: xyzzy_file_exists(should exist)" << endl;
215 }
216
217 // Does a file with name 'filename' exist in magic filesystem?
218 if (xyzzy_file_exists("/-xyzzy-/srfi/srfi-99.scm")) {
219 cout << "FAILED: xyzzy_file_exists(shouldn't exist)" << endl;
220 } else {
221 cout << "PASSED: xyzzy_file_exists(shouldn't exist)" << endl;
gnuradio/gr-run-waveform/xyzzy.cc — 1
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
9b7e9228428e3179f866fe73b088d85a2ecc2222 |
73 in.read(head, length);
74
75 boost::shared_ptr<struct header> header = read_header(reinterpret_cast<boost::uint8_t *>(&head));
76
77 // Check the magic number to make sure it's the right type of file.
78 if (strncmp(header->magic, "-XyZzY-", 8) != 0) {
79 cerr << "ERROR: bad magic number" << endl;
80 return false;
81 }
gnuradio/gr-run-waveform/xyzzy.cc — 2
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
9b7e9228428e3179f866fe73b088d85a2ecc2222 |
75 boost::shared_ptr<struct header> header = read_header(reinterpret_cast<boost::uint8_t *>(&head));
76
77 // Check the magic number to make sure it's the right type of file.
78 if (strncmp(header->magic, "-XyZzY-", 8) != 0) {
79 cerr << "ERROR: bad magic number" << endl;
80 return false;
81 }
82
83 // Read in the Directory table
gnuradio/gr-run-waveform/xyzzy.cc — 3
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
e8a3f5bacd2d7b662e43be4bee0189d91465281b |
108
109 return true;
110 };
111
112 // Does a file with name 'filename' exist in magic filesystem?
113 // bool file_exists(handle, const std::string &filespec);
114 bool
115 XYZZY::file_exists(const std::string &filespec)
116 {
gnuradio/gr-run-waveform/xyzzy.cc — 4
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
712e2a1b1235b9f1272b56ae90afbc776c884f7b |
224 else
225 return datafile.init(filespec);
226 }
227
228 // Does a file with name 'filename' exist in magic filesystem?
229 int
230 xyzzy_file_exists(const char *filespec)
231 {
232 return datafile.file_exists(filespec);
gnuradio/gr-run-waveform/xyzzy.h — 1
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
712e2a1b1235b9f1272b56ae90afbc776c884f7b |
85 // Initialize with the data file produced by gen-xyzzy.
86 bool init();
87 bool init(const std::string &filespec);
88
89 // Does a file with name 'filename' exist in magic filesystem?
90 bool file_exists(const std::string &filespec);
91
92 /// Parse a string data structure
93 static std::string read_string(boost::uint8_t *entry, size_t length);
gnuradio/gr-run-waveform/xyzzy.h — 2
| Category |
Magic |
| Committer |
Rob Savoye |
| Commit ID |
e8a3f5bacd2d7b662e43be4bee0189d91465281b |
114
115 // Initialize with the data file produced by gen-xyzzy.
116 int xyzzy_init(const char *filename);
117
118 // Does a file with name 'filename' exist in magic filesystem?
119 int xyzzy_file_exists(const char *filename);
120
121 // Return a readonly port that accesses filename.
122 SCM xyzzy_open_file (SCM filename);