29 lines
769 B
Plaintext
29 lines
769 B
Plaintext
$NetBSD: patch-aa,v 1.1.1.1 2010/09/03 23:01:47 wiz Exp $
|
|
|
|
Avoid using obsolete functions.
|
|
|
|
--- Extras/glui/glui_list.cpp.orig 2008-05-10 18:00:21.000000000 +0000
|
|
+++ Extras/glui/glui_list.cpp
|
|
@@ -20,7 +20,7 @@
|
|
|
|
#include "glui_internal_control.h"
|
|
#include <cmath>
|
|
-#include <sys/timeb.h>
|
|
+#include <sys/time.h>
|
|
|
|
/****************************** GLUI_List::GLUI_List() **********/
|
|
|
|
@@ -90,9 +90,9 @@ int GLUI_List::mouse_down_handler( in
|
|
{
|
|
int tmp_line;
|
|
unsigned long int ms;
|
|
- timeb time;
|
|
- ftime(&time);
|
|
- ms = time.millitm + (time.time)*1000;
|
|
+ struct timeval now;
|
|
+ gettimeofday(&now, NULL);
|
|
+ ms = now.tv_usec/1000 + now.tv_sec*1000;
|
|
|
|
tmp_line = find_line( local_x-x_abs, local_y-y_abs-5 );
|
|
if ( tmp_line == -1 ) {
|