Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Sandec fix #47

wants to merge 3 commits into from

Conversation

jchillerup
Copy link

Got sandec working, and added the proprietary DLL file to save other people the hassle of finding it.

@twilly twilly self-assigned this Jun 1, 2020
Copy link
Owner

@twilly twilly left a 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;
Copy link
Owner

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.

Copy link
Author

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

Copy link
Owner

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.

Copy link
Author

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

sandec/sandec.c Show resolved Hide resolved
@@ -2,6 +2,7 @@
#include <stdint.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
Copy link
Owner

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));
Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@jchillerup
Copy link
Author

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 :)

@twilly
Copy link
Owner

twilly commented Jun 4, 2020

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants