remove obsolete function

This commit is contained in:
Tomasz Moń
2009-03-13 20:33:24 +01:00
parent 8a39a178c6
commit cd5d7387f3

34
gdigi.c
View File

@@ -30,28 +30,16 @@ static snd_rawmidi_t *output = NULL;
static snd_rawmidi_t *input = NULL; static snd_rawmidi_t *input = NULL;
static char *device = "hw:1,0,0"; static char *device = "hw:1,0,0";
/* /**
calculate checksum * calculate_checksum:
array - the command to set over usb * @array: data to calculate checksum
length - length of array * @length: data length
check - position of checksum byte in array *
*/ * Calculates message checksum
char calculate_checksum(gchar *array, int length, int check) *
{ * Return value: calculated checksum
int x; **/
char checksum; static char calculate_checksum(gchar *array, gint length)
checksum = 0x07;
for (x = 0; x<length; x++) {
if (x == check) continue;
checksum ^= array[x];
}
return checksum;
}
static char calc_checksum(gchar *array, gint length)
{ {
int x; int x;
int checksum = 0; int checksum = 0;
@@ -263,7 +251,7 @@ void send_message(gint procedure, gchar *data, gint len)
} }
g_string_append_printf(msg, "%c\xF7", g_string_append_printf(msg, "%c\xF7",
calc_checksum(&msg->str[1], msg->len - 1)); calculate_checksum(&msg->str[1], msg->len - 1));
send_data(msg->str, msg->len); send_data(msg->str, msg->len);