added helper scripts to create SQL scripts

This commit is contained in:
Martin Willi committed 2008-04-07 06:06:42 +00:00
1 parent 84fc1abf7a
commit 8ec032fc62
2 files changed
+61

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#include <stdio.h>
/**
* convert standard input to SQL hex binary
*/
int main(int argc, char *argv[])
{
int i, end = 0;
unsigned char byte;
printf("X'");
while (1)
{
if (fread(&byte, 1, 1, stdin) != 1)
{
end = 1;
break;
}
printf("%02x", (unsigned int)byte);
}
printf("'\n");
return 0;
}