-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sandec fix #47
base: master
Are you sure you want to change the base?
Sandec fix #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes! I left some minor feedback if you don't mind polishing this a little more.
fi | ||
|
||
mkdir work_tmp; | ||
cd work_tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a little bash trick for you.
TMP=$(mktemp -d)
trap "rm -rf $TMP" EXIT
You'll have a temporary directory that won't collide and will automatically get cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool :)
@@ -0,0 +1,23 @@ | |||
#!/bin/bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using set -euo pipefail
makes bash development a little easier and more robust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nice, didn't know about that either
@@ -2,6 +2,7 @@ | |||
#include <stdint.h> | |||
#include <stdio.h> | |||
#include <fcntl.h> | |||
#include <unistd.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably related to a bugfix in the compiler. Some of the calls in here, like write
, are defined in unistd.h
.
if(fd2<0) | ||
{ | ||
printf("Unable to open '%s'!\n", filename); | ||
char cwd[512]; | ||
getcwd(cwd, sizeof(cwd)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the return value of getcwd
. If it returns NULL then the path exceeded sizeof(cwd)
with ERANGE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
Thanks for the review. I'll revise my commits when I get around to it... My first priority was getting the files off of that darn dictaphone and transcoded to something usable :) |
I totally understand! Heck, I don't even have the hardware anymore to support this project. We'll just make do as the bugs find us. :) |
Got sandec working, and added the proprietary DLL file to save other people the hassle of finding it.