"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "usbparse.c" between
usbview-2.0.tar.gz and usbview-2.1.tar.gz

About: USBView displays information and topography of the devices that are plugged into the USB bus (requires GTK).

usbparse.c  (usbview-2.0):usbparse.c  (usbview-2.1)
/************************************************************************* // SPDX-License-Identifier: GPL-2.0-only
** usbparse.c for USBView - a USB device viewer /*
** Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <greg@kroah.com> * usbparse.c for USBView - a USB device viewer
** * Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <greg@kroah.com>
** This program is free software; you can redistribute it and/or modify */
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; version 2 of the License.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** (See the included file COPYING)
*************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
skipping to change at line 396 skipping to change at line 386
if (config->interface[i] == NULL) if (config->interface[i] == NULL)
break; break;
if (i >= MAX_INTERFACES) { if (i >= MAX_INTERFACES) {
/* ran out of room to hold this interface */ /* ran out of room to hold this interface */
g_warning ("Too many interfaces for this device.\n"); g_warning ("Too many interfaces for this device.\n");
return; return;
} }
interface = (DeviceInterface *)g_malloc0 (sizeof(DeviceInterface)); interface = (DeviceInterface *)g_malloc0 (sizeof(DeviceInterface));
interface->class = (gchar *)g_malloc0 ((INTERFACE_CLASS_SIZE) * si interface->class = (gchar *)g_malloc0 ((INTERFACE_CLASS_SIZE + 1)
zeof(gchar)); * sizeof(gchar));
interface->name = (gchar *)g_malloc0 ((INTERFACE_DRIVERNAME_STRIN interface->name = (gchar *)g_malloc0 ((INTERFACE_DRIVERNAME_STRIN
G_MAXLENGTH) * sizeof(gchar)); G_MAXLENGTH + 1) * sizeof(gchar));
interface->interfaceNumber = GetInt (data, INTERFACE_NUMBER_STRING, 10); interface->interfaceNumber = GetInt (data, INTERFACE_NUMBER_STRING, 10);
interface->alternateNumber = GetInt (data, INTERFACE_ALTERNATESETTIN G_STRING, 10); interface->alternateNumber = GetInt (data, INTERFACE_ALTERNATESETTIN G_STRING, 10);
interface->numEndpoints = GetInt (data, INTERFACE_NUMENDPOINTS_ST RING, 10); interface->numEndpoints = GetInt (data, INTERFACE_NUMENDPOINTS_ST RING, 10);
interface->subClass = GetInt (data, INTERFACE_SUBCLASS_STRING , 16); interface->subClass = GetInt (data, INTERFACE_SUBCLASS_STRING , 16);
interface->protocol = GetInt (data, INTERFACE_PROTOCOL_STRING , 16); interface->protocol = GetInt (data, INTERFACE_PROTOCOL_STRING , 16);
GetString (interface->class, data, INTERFACE_CLASS_STRING, INTERFACE_CLAS S_SIZE); GetString (interface->class, data, INTERFACE_CLASS_STRING, INTERFACE_CLAS S_SIZE);
GetString (interface->name, data, INTERFACE_DRIVERNAME_STRING, INTERFACE_ DRIVERNAME_STRING_MAXLENGTH); GetString (interface->name, data, INTERFACE_DRIVERNAME_STRING, INTERFACE_ DRIVERNAME_STRING_MAXLENGTH);
 End of changes. 2 change blocks. 
19 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)