Skip to content

Instantly share code, notes, and snippets.

@mheuser
mheuser / avarice.rb
Last active January 13, 2016 16:45
homebrew avrdude formular with head
require 'formula'
class Avarice < Formula
homepage 'http://sourceforge.net/projects/avarice/'
url 'http://downloads.sourceforge.net/project/avarice/avarice/avarice-2.13/avarice-2.13.tar.bz2'
sha1 'b0bc56d587600651c0e61be676177b2eebfad3ae'
head 'http://svn.code.sf.net/p/avarice/code/trunk/avarice'
depends_on 'libusb-compat'
diff --git usb_libusb.c usb_libusb.c
index c61bdbd..581fa99 100644
--- usb_libusb.c
+++ usb_libusb.c
@@ -441,6 +441,7 @@ static int usbdev_recv_frame(union filedescriptor *fd, unsigned char *buf, size_
static int usbdev_drain(union filedescriptor *fd, int display)
{
+ /*
usb_dev_handle *udev = (usb_dev_handle *)fd->usb.handle;
getMaxWithAndMaxDepth = (root, depth=0, depthToWidth=[])->
if !depthToWidth[depth] then depthToWidth[depth] = 0
depthToWidth[depth] += root.children.length
getMaxWithAndMaxDepth child, depth+1, depthToWidth for child in root.children
maxDepth = depthToWidth.length
maxWidth = _.max depthToWidth
{maxWidth, maxDepth}