xball-3.0.1+dfsg/0000755000175000017500000000000014461637427014342 5ustar polveraripolverarixball-3.0.1+dfsg/Makefile.am0000644000175000017500000000045614461637417016402 0ustar polveraripolverari## IMPORTANT - If you change this file, run the bootstrap script again bin_PROGRAMS = xball xball_SOURCES = xball.c color_l.c demo.c file_sel.c sim.c \ help.c item.c items.c list.c menu.c misc.c miscx.c room.c \ table.c xball_sys.c scrollbar.c xball_LDADD = -L/usr/X11R6/lib -lXm -lXmu -lXt -lX11 xball-3.0.1+dfsg/miscx.c0000644000175000017500000000330714461637417015633 0ustar polveraripolverari/********************************************************************** * miscx.c - Misc X, Xt and Xmu related functions * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #include #include /********************************************************************** * setupCoverters - Setup user-defined Xt type converters. * * void setupConverters() * * Description: * Sets up string to widget converter. **********************************************************************/ void setupConverters() { static XtConvertArgRec parentCvtArgs[] = { {XtBaseOffset, (caddr_t)XtOffset(Widget, core.parent), sizeof(Widget)} }; XtAddConverter(XtRString, XtRWindow, XmuCvtStringToWidget, parentCvtArgs, XtNumber(parentCvtArgs)); } /********************************************************************** * get_toplevel - Return the toplevel widget in the widget heirarchy. * * Widget get_toplevel(Widget w) * * * w - Any widget in the heirarchy * **********************************************************************/ Widget get_toplevel(w) Widget w; { /* Get the toplevel shell widget to change the cursor for all windows */ while (!XtIsTopLevelShell( w)) w = XtParent( w); return w; } xball-3.0.1+dfsg/demo120000644000175000017500000000033014461637417015347 0ustar polveraripolverari load_bitmap xball-x.xbm 10,10 iterate 10 load_bitmap xball-b.xbm 90,10 iterate 10 load_bitmap xball-a.xbm 170,10 iterate 10 load_bitmap xball-l.xbm 250,10 iterate 10 load_bitmap xball-l.xbm 310,10 iterate 200 exit xball-3.0.1+dfsg/names.h0000644000175000017500000000127714461637417015624 0ustar polveraripolverari#ifndef __NAMES_H__ #define __NAMES_H__ #define GRAVITY_BAR "gravityBar" #define ELASTICITY_BAR "elasticityBar" #define FILE_SB "fileSB" #define HELP_DIALOG "help_dialog" #define RUN_DEMO "runDemo" #define STOP_DEMO "stopDemo" #define CLEAR "clear" #define RANDOMIZE "randomize" #define LOAD_BITMAP "loadBitmap" #define QUIT "quit" #define PERPETUAL "perpetual" #define BALL_COLLIDE "ballCollide" #define STEP_SIM "stepSim" #define HALT_SIM "haltSim" #define ABOUT "about" #define ON_MENUS "onMenus" #define ON_SCROLL "onScroll" #define ON_BUTTONS "onButtons" #define ON_DEMOS "onDemos" #define ON_PARAMS "onParams" #endif xball-3.0.1+dfsg/help.h0000644000175000017500000000144514461637417015446 0ustar polveraripolverari/********************************************************************** * file - description * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __HELP_H__ #define __HELP_H__ #include typedef struct { Widget toplevel; Widget dialog_w; Widget text_w; } help_struct_type, *help_type; /* Public methods */ help_type help__create(/*w*/); void help__destroy(/*help*/); void help__display_mcb(/*w, help, call_data, extra*/); #endif xball-3.0.1+dfsg/file_sel.h0000644000175000017500000000274014461637417016277 0ustar polveraripolverari/********************************************************************** * file_sel.h - Public interface to the file_sel object. * * Copyright 1992, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /********************************************************************** * File Sel Object * * The file object is allows you to request a file from the user. * * Public methods: * * void file_sel__init(file_sel_type *file_sel, help_type *help) * Initialise the file_sel object. * * void file_sel__free( file_sel_type *file_sel) * Free data associated with file_sel object * * char *file_sel__display(file_sel_type *file_sel, char *title) * Display the file selection box and return selected file * **********************************************************************/ #ifndef __FILE_SEL_H__ #define __FILE_SEL_H__ #include typedef struct { Widget dialog_w; Bool searching; char * filename; Widget toplevel; } file_sel_struct_type, *file_sel_type; file_sel_type file_sel__create(/*toplevel*/); void file_sel__destroy(/*file_sel*/); char *file_sel__display(/*file_sel, title*/); #endif /* __FILE_SEL_H__ */ xball-3.0.1+dfsg/intf.h0000644000175000017500000000035214461637417015452 0ustar polveraripolverari#ifndef __INTF_H__ #define __INTF_H__ #define INTFAC 16 /* Multiplied to everything but velocities */ typedef long intf; #define int2intf( val) ((intf)((val)*INTFAC)) #define intf2int( val) ((long)((val)/INTFAC)) #endif xball-3.0.1+dfsg/demo.h0000644000175000017500000000344214461637417015441 0ustar polveraripolverari/********************************************************************** * demo.h - declares the demo object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __DEMO_H__ #define __DEMO_H__ #include #include #include "menu.h" #include "scrollbar.h" #include "file_sel.h" #include "items.h" #include "room.h" typedef struct { Bool interactive; /* Demo 'exit' will not exit program if interactive is True */ scrollbar_type gravity; /* Gravity scrollbar */ scrollbar_type elasticity; /* Elasticity acrollbar */ menu_type menu; file_sel_type file_sel; /* To query user for demo file */ items_type items; room_type room; FILE * file_ptr; /* The file pointer for the current demo file */ char * file_name; /* The name of the current demo file */ unsigned iterations; /* Number of iterations we are currently pausing */ } demo_struct_type, *demo_type; /* Public methods */ demo_type demo__create(/* w, menu, gravity, elasticity, file_sel, items, room*/); void demo__destroy(/* demo*/); void demo__run_mcb(/* w, demo, call_data, extra*/); void demo__stop_mcb(/* w, demo, call_data, extra*/); void demo__stop(/* demo*/); Bool demo__running(/*demo*/); void demo__process(/*demo*/); /* Inline functions */ #define demo__set_interactive( demo, inter) ((demo)->interactive = (inter)) #endif xball-3.0.1+dfsg/menu.h0000644000175000017500000000260214461637417015456 0ustar polveraripolverari/********************************************************************** * menu,h - Menu system declarations * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __MENU_H__ #define __MENU_H__ #include #include "table.h" typedef struct { table_type mc_table; /* Table of callbacks avalibale for use */ table_type closure_table; /* Table of callbacks added */ Widget menubar; #ifdef ATHENA Pixmap on_bitmap; Pixmap off_bitmap; #endif } menu_struct_type, *menu_type; typedef struct { int set; } menuCallbackStruct; typedef void (*menuCallbackProc)(/* Widget, caddr_t, menuCallbackStruct *, char * */); menu_type menu__create(/* form */); void menu__destroy(/*menu*/); void menu__add_callback(/* menu, action_name, menu_callback_proc, user_data */); void menu__set_toggle(/* menu, widget_name, set*/); Bool menu__get_toggle(/* menu, widget_name*/); void menu__set_sensitivity(/* menu, widget_name, sensitive*/); #endif xball-3.0.1+dfsg/demo30000644000175000017500000000041414461637417015272 0ustar polveraripolverari# Load bitmap with all balls having the same velocity # After they bounce down, have them fall through # once collide off load_bitmap xball.xbm 0,0 set_velocity abs 3,-10 gravity 10 elasticity 85 perpetual on iterate 700 perpetual off gravity 20 iterate 200 exit xball-3.0.1+dfsg/xball_sys.h0000644000175000017500000000247114461637417016516 0ustar polveraripolverari/********************************************************************** * xball_sys.h - xball system object declarations * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __XBALL_SYS_H__ #define __XBALL_SYS_H__ #include #include "menu.h" #include "demo.h" #include "room.h" #include "items.h" #include "sim.h" #include "scrollbar.h" #include "file_sel.h" #include "help.h" typedef struct { Widget form_w; Widget pane_w; menu_type menu; demo_type demo; items_type items; room_type room; sim_type sim; help_type help; scrollbar_type gravity_bar; scrollbar_type elasticity_bar; file_sel_type file_sel; } xball_system_struct, *xball_system_type; xball_system_type xball_system__create(/* w*/); void xball_system__destroy(/*xball_system*/); void xball_system__quit_mcb(/* w, datap_ptr, call_data, extra*/); #endif xball-3.0.1+dfsg/xball.xbm0000644000175000017500000000073714461637417016162 0ustar polveraripolverari#define xball_width 32 #define xball_height 16 static char xball_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x1e, 0xc0, 0x18, 0x88, 0x24, 0x80, 0x10, 0x50, 0x24, 0x87, 0x10, 0x20, 0x1c, 0x88, 0x10, 0x50, 0x24, 0x8f, 0x10, 0x88, 0xa4, 0x88, 0x10, 0x88, 0x1e, 0xcf, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xball-3.0.1+dfsg/xball_sys.c0000644000175000017500000001452714461637417016516 0ustar polveraripolverari/********************************************************************** * xball_sys.c - xball system object definition. * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #ifdef MOTIF #include #include #endif #ifdef ATHENA #include #endif /* Local headers */ #include "xball_sys.h" #include "names.h" #include "misc.h" /* Creates the xball system. This object holds together the other objects in the system. */ xball_system_type xball_system__create( w) Widget w; { xball_system_type xball_system; menu_type menu; room_type room; demo_type demo; help_type help; sim_type sim; items_type items; file_sel_type file_sel; scrollbar_type gravity_bar; scrollbar_type elasticity_bar; Widget form_widget; typedef struct { int gravity; int elasticity; Boolean ball_collide; Boolean perpetual; Boolean halt_sim; } app_data,*app_data_ptr; app_data res_data; static XtResource resources[] = { { "gravity", "Gravity", XtRInt, sizeof(int), XtOffset(app_data_ptr,gravity), XtRImmediate, (caddr_t)GRAVITY }, { "elasticity", "Elasticity", XtRInt, sizeof(int), XtOffset(app_data_ptr,elasticity), XtRImmediate,(caddr_t)ELASTICITY }, { "collide", "Collide", XtRBoolean, sizeof(Boolean), XtOffset(app_data_ptr,ball_collide), XtRString, "False"}, { "perpetual", "Perpetual", XtRBoolean, sizeof(Boolean), XtOffset(app_data_ptr,perpetual), XtRString, "False"}, { "haltSim", "HaltSim", XtRBoolean, sizeof(Boolean), XtOffset(app_data_ptr,halt_sim), XtRString, "False"} }; XtGetApplicationResources(w, (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); xball_system = XtNew( xball_system_struct); /* Create the various objects in the system */ #ifdef MOTIF xball_system->form_w = form_widget = XtCreateWidget("form", xmFormWidgetClass, w, NULL,0); #endif #ifdef ATHENA xball_system->form_w = form_widget = XtVaCreateWidget( "formAW", formWidgetClass, w, NULL); #endif xball_system->menu = menu = menu__create( form_widget); xball_system->elasticity_bar = elasticity_bar = scrollbar__create( form_widget, ELASTICITY_BAR); xball_system->gravity_bar = gravity_bar = scrollbar__create( form_widget, GRAVITY_BAR); item__set_perpetual( menu__get_toggle( menu, PERPETUAL)); item__set_ball_collide( menu__get_toggle( menu, BALL_COLLIDE)); xball_system->file_sel = file_sel = file_sel__create(w); xball_system->items = items = items__create(); xball_system->room = room = room__create( form_widget, items, file_sel); xball_system->demo = demo = demo__create(w, menu, gravity_bar, elasticity_bar, file_sel, items, room); xball_system->sim = sim = sim__create(w, menu, items, room, demo); xball_system->help = help = help__create(w); XtManageChild( form_widget); /* Add the scrollbar callbacks and set their values */ scrollbar__add_callback( xball_system->gravity_bar, room__set_gravity_cb, (XtPointer)xball_system->room); scrollbar__set_value( xball_system->gravity_bar, res_data.gravity); scrollbar__add_callback( xball_system->elasticity_bar, item__set_elasticity_cb, (XtPointer)NULL); scrollbar__set_value( xball_system->elasticity_bar, res_data.elasticity); /* Register avaliable menu callbacks */ menu__add_callback(menu, "runDemo", demo__run_mcb, demo); menu__add_callback(menu, "stopDemo", demo__stop_mcb, demo); menu__add_callback(menu, "clear", room__clear_mcb, room); menu__add_callback(menu, "randomize", room__randomize_mcb, room); menu__add_callback(menu, "loadBitmap", room__load_bitmap_mcb, room); menu__add_callback(menu, "quit", xball_system__quit_mcb, xball_system); menu__add_callback(menu, "perpetual", item__perpetual_mcb, NULL); menu__add_callback(menu, "ballCollide", item__collide_mcb, NULL); menu__add_callback(menu, "haltSim", sim__halt_mcb, sim); menu__add_callback(menu, "stepSim", sim__step_mcb, sim); /* Set the values of these menu toggle widgets */ menu__set_toggle( menu, PERPETUAL, res_data.perpetual); menu__set_toggle( menu, BALL_COLLIDE, res_data.ball_collide); menu__set_toggle( menu, HALT_SIM, res_data.halt_sim); menu__add_callback(menu, "about", help__display_mcb, help); menu__add_callback(menu, "onMenus", help__display_mcb, help); menu__add_callback(menu, "onScroll", help__display_mcb, help); menu__add_callback(menu, "onButtons", help__display_mcb, help); menu__add_callback(menu, "onDemos", help__display_mcb, help); menu__add_callback(menu, "onParams", help__display_mcb, help); return xball_system; } /* Free the xball system object */ void xball_system__destroy(xball_system) xball_system_type xball_system; { file_sel__destroy( xball_system->file_sel); help__destroy( xball_system->help); demo__destroy( xball_system->demo); room__destroy( xball_system->room); sim__destroy( xball_system->sim); items__destroy( xball_system->items); scrollbar__destroy( xball_system->elasticity_bar); scrollbar__destroy( xball_system->gravity_bar); menu__destroy( xball_system->menu); XtDestroyWidget( xball_system->form_w); XtFree( (char *)xball_system); } /* Called if the user selects the quit menu item */ void xball_system__quit_mcb( w, xball_system, call_data, extra) Widget w; xball_system_type xball_system; caddr_t call_data; char * extra; { XtCloseDisplay(XtDisplay(xball_system->form_w)); exit(EXIT_SUCCESS); } xball-3.0.1+dfsg/xball-l.xbm0000644000175000017500000000017614461637417016410 0ustar polveraripolverari#define xball_l_width 4 #define xball_l_height 7 static char xball_l_bits[] = { 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e}; xball-3.0.1+dfsg/stipple.xbm0000644000175000017500000000014014461637417016524 0ustar polveraripolverari#define stipple_width 2 #define stipple_height 2 static char stipple_bits[] = { 0x01, 0x02}; xball-3.0.1+dfsg/room.c0000644000175000017500000003551014461637417015465 0ustar polveraripolverari/********************************************************************** * room.c - Room object definition * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #include #include #ifdef MOTIF #include #endif #ifdef ATHENA #include #endif /* Local headers */ #include "room.h" #include "misc.h" #include "scrollbar.h" /* Macros */ /* This is the spacing between the balls representing pixels on the bitmap */ #define SF 1.5 /* FIX - make a resource */ /* Functions */ static void redisplay_cb(/*w, room, call_data*/); static void resize_cb(/*w, datap_ptr, call_data*/); static void process_input_cb(/*w, room, call_data*/); static void wait_for_resize(/* room*/); static Widget create_canvas(/* parent, name*/); /* Object public methods */ /* Create the room object */ room_type room__create( form_w, items, file_sel) Widget form_w; items_type items; file_sel_type file_sel; { Dimension right_wall; Dimension floor; Widget canvas; room_type room = XtNew( room_struct_type); room->item = (item_type)0; room->items = items; room->file_sel = file_sel; room->left_wall = int2intf(0); room->ceiling = int2intf(0); /* room->gravity is set in xball_sys via scrollbar callback */ room->button1 = False; room->button2 = False; room->button3 = False; room->canvas = canvas = create_canvas( room, form_w, "canvas"); XtVaGetValues(canvas, XtNbackground, &room->background, XtNwidth, &right_wall, XtNheight, &floor, NULL); room->right_wall = int2intf( right_wall); room->floor = int2intf( floor); return room; } /* Destroy the room object */ void room__destroy( room) room_type room; { XtDestroyWidget( room->canvas); XtFree( (char *)room); } /* Called when the scrollbar changes. Sets the gravity value */ void room__set_gravity_cb(w, room, call_data) Widget w; room_type room; scrollbarCallbackStruct * call_data; { room->gravity = call_data->value; } /* A menu callback that clears the room of all balls */ void room__clear_mcb(w, room, call_data, extra) Widget w; room_type room; caddr_t call_data; char * extra; { items__destroy_all( room->items); } /* A menu callback that randomizes all balls in the room */ void room__randomize_mcb(w, room, call_data, extra) Widget w; room_type room; caddr_t call_data; char * extra; { item_type item; for (item = items__get_first( room->items); item != (item_type)0; item = items__get_next( room->items)) { item__randomize( item, -16, 16, -16, 16); } } /* A menu callback that queries the user for a bitmap and then loads it */ void room__load_bitmap_mcb(w, room, call_data, extra) Widget w; room_type room; caddr_t call_data; char * extra; { char *file_name = file_sel__display( room->file_sel, "Load Bitmap"); if (file_name != (char *)0) room__load_bitmap( room, file_name, 10, 10); } /* Loads the specified bitmap file at the specified position in the room */ void room__load_bitmap(room, filename, pos_x, pos_y) room_type room; char * filename; int pos_x; int pos_y; { unsigned width, height; /* Bitmap dimensions */ int x_hot, y_hot; Pixmap bitmap; /* The bitmap as a pixmap */ XImage * ximage; /* The bitmap as an image */ int x, y; int status; Dimension new_width, new_height; status = XReadBitmapFile(XtDisplay(room->canvas), XtWindow(room->canvas), filename, &width, &height, &bitmap, &x_hot, &y_hot); switch (status) { case BitmapOpenFailed: fprintf(stderr, "room__load_bitmap: Could not open bitmap file %s\n",filename); return; break; case BitmapFileInvalid: fprintf(stderr, "room__load_bitmap: Bitmap file %s does not contain valid data\n", filename); return; break; case BitmapNoMemory: fprintf(stderr, "room__load_bitmap: Not enough memory to open bitmap file %s\n", filename); return; break; } /* Get a local copy of the pixmap so we can query the pixel values */ ximage = XGetImage(XtDisplay(room->canvas), bitmap,0,0,width,height,AllPlanes,XYPixmap); if (ximage == NULL) { fprintf(stderr,"room__load_bitmap: Problem getting bitmap image\n"); return; } new_width = MAX( intf2int(room->right_wall), pos_x + width * item__get_width() * SF+10); new_height = MAX( intf2int(room->floor), pos_y + height * item__get_height() * SF+10); if (new_width != intf2int(room->right_wall) || new_height != intf2int(room->floor)) { room->resized = False; /* Set the window width and height so the balls fit on it */ XtVaSetValues(room->canvas, XtNwidth, new_width, XtNheight, new_height, NULL); wait_for_resize( room); } /* Create a ball for each pixel set in the bitmap */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { if (XGetPixel(ximage, x, y)) items__new_item(room->items, (int)(x * item__get_width() * SF + pos_x), (int)(y * item__get_height() * SF + pos_y), /*x_vel*/0, /*y_vel*/0); } } } /* Set the room's width and wait for the window to resize before returning */ void room__set_width(room, width) room_type room; int width; { Dimension d_width = width; if (intf2int(room->right_wall) == width) return; room->resized = False; XtVaSetValues(room->canvas, XtNwidth, d_width, NULL); /* room->right_wall = int2intf(width); Set in window resize callback */ wait_for_resize( room); } /* Set the height of the room, resize the actual room and wait for it to resize before returning. */ void room__set_height(room, height) room_type room; Dimension height; { Dimension d_height = height; if (intf2int(room->floor) == height) return; room->resized = False; XtVaSetValues(room->canvas, XtNheight, d_height, NULL); /* room->floor = int2intf(height); set in the window resize callback */ wait_for_resize( room); } /* Private object methods */ /********************************************************************** * redisplay - Called when DrawingArea canvas gets an expose event * Redraws all balls in room **********************************************************************/ static void redisplay(room, event) room_type room; XEvent * event; { Display * display = XtDisplay( room->canvas); Window window = XtWindow ( room->canvas); if (!item__initted()) { Cursor cursor = XCreateFontCursor( display, XC_watch ); XDefineCursor( display, window, cursor); item__init( get_toplevel( room->canvas), display, window, room->background); XFreeCursor( display, cursor); XUndefineCursor( display, window); } if (event->xexpose.count == 0) /* Wait until last expose event*/ { item_type item; XClearWindow( display, window); for (item = items__get_first( room->items); item != (item_type)0; item = items__get_next( room->items)) { item__redraw( item); } } } /********************************************************************** * resize_cb - Called when DrawingArea canvas is resized * Adjusts the right wall and floor **********************************************************************/ static void resize_cb(w, room, call_data) Widget w; room_type room; caddr_t call_data; { Dimension width,height; XtVaGetValues(w, XtNwidth, &width, XtNheight, &height, NULL); room->right_wall = int2intf(width); room->floor = int2intf(height); /* Set flag in case someone is waiting for the resize */ room->resized = True; } /* Waits for the window to actually resize. This depends on the resize callback code setting the room->resized flag to True. Callers should set the room->resized flag to False before calling. */ static void wait_for_resize( room) room_type room; { XEvent event; XtAppContext app_context; app_context = XtWidgetToApplicationContext( room->canvas); /* Wait for the window resize to occur */ while (!room->resized) { XtAppNextEvent(app_context, &event); XtDispatchEvent(&event); } } /********************************************************************** * process_input - Called when DrawingArea canvas has input * Handles mouse button events **********************************************************************/ static void process_input( room, event) room_type room; XEvent * event; { switch (event->type) { /* Process mouse button events */ case ButtonPress: switch (event->xbutton.button) { case 1: /* Button 1 - Create 1 item under the pointer */ room->oldx = room->newx = event->xbutton.x; room->oldy = room->newy = event->xbutton.y; /* Create an item under the pointer */ room->item = item__create(event->xbutton.x, event->xbutton.y, /*x,y velocity*/ 0, 0); room->button1 = True; break; /* Remember the button we have pressed (used in mouse motion) */ case 2: room->button2 = True; break; case 3: room->button3 = True; break; } break; case ButtonRelease: switch (event->xbutton.button) { /* button 1 release - move item to items list */ case 1: item__set_x_vel( room->item, room->newx - room->oldx); item__set_y_vel( room->item, room->newy - room->oldy); items__add( room->items, room->item); room->item = (item_type)0; room->button1 = False; break; /* Remember the button we have unpressed (used in mouse motion) */ case 2: room->button2 = False; break; case 3: room->button3 = False; break; } } } /********************************************************************** * process_motion - Called when DrawingArea canvas have pointer motion events **********************************************************************/ static void process_motion( room, event) room_type room; XEvent * event; { if (room->button1) { /* When button 1 pressed during movement */ /* Save 'speed' of pointer for when the button is released */ room->oldx = room->newx; room->oldy = room->newy; room->newx = event->xmotion.x; room->newy = event->xmotion.y; item__set_x_vel( room->item, (room->newx - room->oldx)); item__set_y_vel( room->item, (room->newy - room->oldy)); item__move_pos( room->item, event->xmotion.x, event->xmotion.y); } else if (room->button2) { /* Create a random velocity ball */ items__new_item(room->items, event->xmotion.x, event->xmotion.y, rand_range( -8, 8), rand_range( -8, 0)); } else if (room->button3) { items__new_item(room->items, event->xmotion.x, event->xmotion.y, 0, 0); } } #ifdef MOTIF static void process_motion_act(/*w, datap_ptr, event*/); /* Create motif canvas as a DrawingArea Widget */ static Widget create_canvas( room, parent, name) room_type room; Widget parent; char * name; { Widget canvas = XtCreateManagedWidget("canvas", xmDrawingAreaWidgetClass, parent, NULL, 0); XtAddCallback(canvas, XmNexposeCallback, redisplay_cb, (XtPointer)room); XtAddCallback(canvas, XmNinputCallback, process_input_cb,(XtPointer)room); XtAddCallback(canvas, XmNresizeCallback, resize_cb, (XtPointer)room); XtAddEventHandler(canvas, ButtonMotionMask, FALSE, process_motion_act, (XtPointer)room); return canvas; } static void redisplay_cb(w, room, call_data) Widget w; room_type room; XmDrawingAreaCallbackStruct * call_data; { redisplay( room, call_data->event); } static void process_input_cb(w, room, call_data) Widget w; room_type room; XmDrawingAreaCallbackStruct * call_data; { process_input( room, call_data->event); } static void process_motion_act(w, room, event) Widget w; room_type room; XEvent * event; { process_motion( room, event); } #endif #ifdef ATHENA static void process_motion_cb(/*w, room, call_data*/); /* Create canvas as a DrawingArea widget */ static Widget create_canvas( room, parent, name) room_type room; Widget parent; char * name; { Widget canvas = XtCreateManagedWidget("canvas", drawingAreaWidgetClass, parent, NULL, 0); XtAddCallback(canvas,XtNexposeCallback,redisplay_cb, (XtPointer)room); XtAddCallback(canvas,XtNinputCallback, process_input_cb, (XtPointer)room); XtAddCallback(canvas,XtNresizeCallback,resize_cb, (XtPointer)room); XtAddCallback(canvas,XtNmotionCallback,process_motion_cb, (XtPointer)room); return canvas; } static void redisplay_cb(w, room, call_data) Widget w; room_type room; XawDrawingAreaCallbackStruct * call_data; { redisplay( room, call_data->event); } static void process_input_cb(w, room, call_data) Widget w; room_type room; XawDrawingAreaCallbackStruct * call_data; { process_input( room, call_data->event); } static void process_motion_cb(w, room, call_data) Widget w; room_type room; XawDrawingAreaCallbackStruct * call_data; { process_motion( room, call_data->event); } #endif xball-3.0.1+dfsg/miscx.h0000644000175000017500000000113014461637417015630 0ustar polveraripolverari/********************************************************************** * miscx.h - Misc X, Xt and Xmu related functions * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __MISCX_H__ #define __MISCX_H__ void setupConverters(); Widget get_toplevel(/*w*/); #endif xball-3.0.1+dfsg/XBall.ad0000644000175000017500000004102714461637417015655 0ustar polveraripolverari!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! XBall.ad - xball resource file ! ! Copyright 1991, David Nedde ! ! Permission to use, copy, modify, and distribute this ! software and its documentation for any purpose and without fee ! is granted provided that the above copyright notice appears in all copies. ! It is provided 'as is' without express or implied warranty. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! XBall.delay: 100 XBall.gravity: 8 XBall.elasticity: 90 XBall.itemWidth: 10 XBall.itemHeight: 10 XBall.collide: False XBall.perpetual: False XBall.haltSim: False XBall.title: XBall - Written by David Nedde XBall*form.horizontalSpacing: 2 XBall*form.verticalSpacing: 2 XBall*form.width: 400 XBall*form.height: 400 XBall.allowShellResize: True XBall*resizable: True !!!!!!!!!! ! Menu Bar !!!!!!!!!! XBall*menuBar.rightAttachment: ATTACH_FORM XBall*menuBar.leftAttachment: ATTACH_FORM ! Athena resources XBall*menuBar*MenuButton.borderWidth: 0 XBall*menuBar.borderWidth: 1 XBall.formAW*translations: #override \n\ q: menu_action( quit) \n\ Ctrlq: menu_action( quit) \n\ Ctrlc: menu_action( quit) \n\ c: menu_action( clear) \n\ r: menu_action( randomize) \n\ s: menu_action( stepSim) \n\ p: menu_action( perpetual) \n\ b: menu_action( ballCollide) \n\ h: menu_action( haltSim) \n\ l: menu_action( loadBitmap) \n\ d: menu_action( runDemo) \n\ a: menu_action( about) \n\ ! File Submenu XBall*file.labelString: File XBall*file.label: File XBall*file.mnemonic: F XBall*about.labelString: About... XBall*about.label: About... A XBall*about.mnemonic: A XBall*about.accelerator: A XBall*about.acceleratorText: A XBall*runDemo.labelString: Run Demo... XBall*runDemo.label: Run Demo... D XBall*runDemo.mnemonic: D XBall*runDemo.accelerator: D XBall*runDemo.acceleratorText: D XBall*loadBitmap.labelString: Load Bitmap... XBall*loadBitmap.label: Load Bitmap... L XBall*loadBitmap.mnemonic: L XBall*loadBitmap.accelerator: L XBall*loadBitmap.acceleratorText: L XBall*quit.labelString: Quit XBall*quit.label: Quit Q XBall*quit.mnemonic: Q XBall*quit.accelerator: Q XBall*quit.acceleratorText: Q ! Action Submenu XBall*actions.labelString: Actions XBall*actions.label: Actions XBall*actions.mnemonic: A XBall*clear.labelString: Clear XBall*clear.label: Clear C XBall*clear.mnemonic: C XBall*clear.acceleratorText: C XBall*clear.accelerator: C XBall*randomize.labelString: Randomize XBall*randomize.label: Randomize R XBall*randomize.mnemonic: R XBall*randomize.acceleratorText:R XBall*randomize.accelerator: R XBall*stopDemo.labelString: Stop Demo XBall*stopDemo.label: Stop Demo XBall*stepSim.labelString: Step Simulation XBall*stepSim.label: Step Simulation S XBall*stepSim.mnemonic: S XBall*stepSim.acceleratorText: S XBall*stepSim.accelerator: S ! Options Submenu XBall*options.labelString: Options XBall*options.label: Options XBall*options.mnemonic: O XBall*perpetual.labelString: Perpetual XBall*perpetual.label: Perpetual P XBall*perpetual.mnemonic: P XBall*perpetual.acceleratorText: P XBall*perpetual.accelerator: P XBall*ballCollide.labelString: Ball Collide XBall*ballCollide.label: Ball Collide B XBall*ballCollide.mnemonic: B XBall*ballCollide.acceleratorText: B XBall*ballCollide.accelerator: B XBall*haltSim.labelString: Halt Simulation XBall*haltSim.label: Halt Simulation H XBall*haltSim.mnemonic: H XBall*haltSim.acceleratorText: H XBall*haltSim.accelerator: H ! Help Submenu XBall*help.labelString: Help XBall*help.label: Help XBall*help.mnemonic: H XBall*onAuthor.labelString: On Author... XBall*onAuthor.label: On Author... XBall*onMenus.labelString: On Menus... XBall*onMenus.label: On Menus... XBall*onScroll.labelString: On Scrollbars... XBall*onScroll.label: On Scrollbars... XBall*onButtons.labelString: On Buttons... XBall*onButtons.label: On Buttons... XBall*onDemos.labelString: On Demos... XBall*onDemos.label: On Demos... XBall*onParams.labelString: On Parameters... XBall*onParams.label: On Parameters... XBall*elasticityBar.topAttachment: ATTACH_WIDGET XBall*elasticityBar.topWidget: menuBar XBall*elasticityBar.leftAttachment: ATTACH_FORM XBall*elasticityBar.label.labelString: Elasticity XBall*elasticityBar.label.leftAttachment: ATTACH_FORM XBall*elasticityBar.label.leftOffset: 10 XBall*elasticityBar.label.topAttachment: ATTACH_FORM XBall*elasticityBar.label.bottomAttachment: ATTACH_FORM ! Athena resources XBall*elasticityBar.fromVert: menuBar XBall*elasticityBar.label.label: Elasticity XBall*elasticityBar.label.borderWidth: 0 XBall*elasticityBar.bar.width: 100 XBall*elasticityBar.bar.orientation: HORIZONTAL XBall*elasticityBar.bar.maximum: 100 XBall*elasticityBar.bar.minimum: 0 XBall*elasticityBar.bar.showValue: True ! Athena resources XBall*elasticityBar.bar.shown: 0.1 XBall*elasticityBar.borderWidth: 0 XBall*elasticityBar.label.borderWidth: 0 XBall*elasticityBar.feedback.borderWidth: 0 XBall*elasticityBar.defaultDistance: 0 XBall*gravityBar.label.labelString: Gravity XBall*gravityBar.label.leftAttachment: ATTACH_FORM XBall*gravityBar.label.topAttachment: ATTACH_FORM XBall*gravityBar.label.bottomAttachment: ATTACH_FORM ! Athena resources XBall*gravityBar.label.label: Gravity XBall*gravityBar.label.borderWidth: 0 XBall*gravityBar.leftAttachment: ATTACH_WIDGET XBall*gravityBar.leftWidget: elasticityBar XBall*gravityBar.leftOffset: 20 XBall*gravityBar.topAttachment: ATTACH_WIDGET XBall*gravityBar.topWidget: menuBar XBall*gravityBar.bar.width: 100 XBall*gravityBar.bar.orientation: HORIZONTAL XBall*gravityBar.bar.maximum: 100 XBall*gravityBar.bar.minimum: 0 XBall*gravityBar.bar.showValue: True ! Athena resources XBall*gravityBar.fromVert: menuBar XBall*gravityBar.horizDistance: 20 XBall*gravityBar.fromHoriz: elasticityBar XBall*gravityBar.bar.shown: 0.1 XBall*gravityBar.borderWidth: 0 XBall*gravityBar.label.borderWidth: 0 XBall*gravityBar.feedback.borderWidth: 0 XBall*gravityBar.defaultDistance: 0 XBall*canvas.resizable: True XBall*canvas.borderWidth: 1 XBall*canvas.topAttachment: ATTACH_WIDGET XBall*canvas.topWidget: gravityBar XBall*canvas.bottomAttachment: ATTACH_FORM XBall*canvas.rightAttachment: ATTACH_FORM XBall*canvas.leftAttachment: ATTACH_FORM ! Athena resources XBall*canvas.fromVert: gravityBar XBall*canvas.width: 400 XBall*canvas.height: 330 XBall*help_dialog_popup.title: XBall Information XBall*help_dialog_action_area.leftAttachment: ATTACH_FORM XBall*help_dialog_action_area.rightAttachment: ATTACH_FORM XBall*help_dialog_action_area.bottomAttachment: ATTACH_FORM XBall*help_dialog_action_area.close.labelString: Close XBall*help_dialog.close.label: Close XBall*help_dialog.separator.rightAttachment: ATTACH_FORM XBall*help_dialog.separator.leftAttachment: ATTACH_FORM XBall*help_dialog.separator.topOffset: 5 XBall*help_dialog.separator.bottomAttachment: ATTACH_WIDGET XBall*help_dialog.separator.bottomWidget: help_dialog_action_area XBall*help_dialog*help_text.rows: 12 XBall*help_dialog*help_text.columns: 60 ! Athena Resources XBall*help_dialog*help_textAW.displayCaret: False XBall*help_dialog*help_textAW.height: 150 XBall*help_dialog*help_textAW.width: 470 XBall*help_dialog*help_textAW.scrollHorizontal: WhenNeeded XBall*help_dialog*help_textAW.scrollVertical: WhenNeeded XBall*help_dialog*close.accelerators: \ Escape: set() notify() unset() \n\ Return: set() notify() unset() \n\ !!!!!!!!!!! ! Help text !!!!!!!!!!! ! ! Note that since fallback resources cannot handle \n in the text, ! a ~ is used to indicate a newline. ! !!!!!!!!!! XBall.pointerHelp: \ MOUSE BUTTON USAGE ~~~\ Button 1: o Hold down to create a ball. ~\ o Throw the ball by moving the mouse and ~\ letting go of button 1. ~\ o The ball will be going the speed of the ~\ pointer at release time. ~\ Button 2: o Hold down and move the mouse to create ~\ random velocity balls. ~\ Button 3: o Hold down and move the mouse to create ~\ zero velocity balls. \ XBall.menuHelp: \ PULLDOWN MENU USAGE~~~\ File~\ About... A description of the program and author~\ Run Demo... Allows you to execute XBall demo files~\ See 'Help On Demos' for demo file format~\ Load Bitmap... Load an X bitmap as a set of balls~\ Analogous Demo command: ~\ bitmap filename posx,posy~\ Quit Exits the program~~\ Actions~\ Clear Clear the screen of balls~\ Analogous Demo command: clear~\ Randomize Give each ball a random velocity~\ Analogous Demo command: ~\ randomize minx,maxx,miny,maxy~\ Stop Demo Stops the execution of a demo in progress~\ Enabled by the Run Demo... menu option~\ Analogous Demo command: stop~\ Step Simulation Perform one step of the Halted simulation~\ Enabled by the Halt Simulation menu option~~\ Options~\ Perpetual If toggled on, balls will live forever~\ Analogous Demo command: perpetual on|off~\ Command line option: -perpetual True|False~\ Ball Collide If on, balls will collide with one another~\ Analogous Demo command: collide on|off~\ Command line option: -collide True|False~~\ Help Simulation Stop the simulation. You can then step the~\ simulation using Step Simulation menu option~~\ Help~\ On Menus Help using the menu system~\ On Scrollbars Help on the Elasticity and Gravity bars~\ On Buttons Help on using the mouse buttons to create balls~\ On Demos Help on the Demo language and how to run demos~\ On Parameters Help with command-line arguments to xball \ XBall.scrollbarHelp: \ SCROLLBAR USAGE~~~\ Elasticity~\ o This scrollbar controls the balls' elasticity, or how~\ much energy is lost each time the balls hit the ground.~\ o Scrollbar to left: low elasticity (eggs)~\ o Scrollbar to right: high elasticity (superballs)~\ o Demo command: elasticity %d~\ o Command line options: -elasticity %d~~~\ Gravity~\ o This scrollbar controls the gravity, or how~\ much vertical velocity is added (subtracted)~\ from the balls for each iteration.~\ o Scrollbar to the left: Zero gravity (outer space)~\ o Scrollbar to the right: Large gravity (Jupiter)~\ o Demo command: gravity %d~\ o Command line options: -gravity %d \ XBall.demoHelp: \ DEMO FILE COMMANDS~~\ %s1, %s2... - Replace with a string~\ %d1, %d2... - Replace with an integer~~\ create %d1,%d2,%d3,%d4: Create a ball with x,y position~\ %d1,%d2 and an x & y velocity~\ of %d2,%d4~\ randomize %d1,%d2,%d3,%d4: randomize velocities of all ~\ balls on screen with:~\ a max negative x velocity of %d1,~\ a max positive x velocity of %d2,~\ a max negative y velocity of %d3,~\ a max positive y velocity of %d4,~\ load_bitmap %s %d1,%d2: load a bitmap file (where %s is~\ the file path) to an x,y position~\ of %d1,%d2 on the screen~\ set_velocity %s %d1,%d2: set ball velocities (%s is~\ relative or absolute) to the x ~\ and y velocities %d1,%d2~\ gravity %d: set gravity to %d~\ elasticity %d: set elasticity to %d~\ backwards %d: Run simulation backwards %d iterations~\ visible %s: Make ball display 'on' or 'off'~\ iterate %d: simulate for %d iterations~\ sleep %d: sleep for %d seconds~\ perpetual %s: toggle perpetual (%s is 'on' or 'off')~\ collide %s: toggle ball collision (%s is 'on' or 'off')~\ window_width %d: Change window width to %d~\ window_height %d: Change window height to %d~\ backwards %d: Iterate backwards %d steps~\ clear: delete all balls in window~\ create_random %d1,%d2: create %d1 random balls with a ~\ max velocity of %d2~\ exit or quit: quit the xball program if demo is not~\ interactive~\ stop: stop demo but leave program alive \ XBall.startupHelp: \ PROGRAM STARTUP PARAMETERS~~~\ Run xball -help for a list of command-line startup~\ parameters XBall.aboutString: \ XBall Version 0.3.0~~\ April 1993~~\ The Premire Ball Bouncing Software~~\ Allows you to throw 3-D balls around in a 2-D space.~~\ Author (Send bugs, comments, and interesting demos to):~\ David Nedde~\ daven@ivy.wpi.edu~\ Computer Science Department~\ Worcester Polytechnic Institute~\ Worcester, MA 01609~~\ Copyright 1990, 1993 David Nedde~\ Permission to use, copy, modify, and distribute this~\ software and its documentation for any purpose and~\ without fee is granted provided that the above~\ copyright notice appears in all copies. It is~\ provided \"as is\" without express or implied warranty. \ !!!!!!!!!!!!!!!!! ! Menu Definition !!!!!!!!!!!!!!!!! ! ! Format: ! pulldownName~ ! widgetName,widgetClass,menuCallbackName,optionalParams...~ ! ! The widgetName is referenced above to set the menu's label. ! ! Note that the pulldownName of 'help' is automatically used as the help ! pulldown. ! ! Avaliable WidgetClasses are: ! PushButton - push it and cause the action ! ToggleButton - Push it and toggle the state ! Separator - A line in the menu ! ! Avaliable menuCallbackNames avaliable (none take optional parameters): ! runDemo - Lets user select a demo and run the demo ! loadBitmap - Lets user load a bitmap file ! quit - quits xball program ! clear - Clear all balls from the screen ! randomize - Randomize all balls from the screen ! stopDemo - Stop a demo in progress ! stepSim - Steps the simulation once (if simulation halted) ! perpetual - Toggles perpetual balls state ! ballCollide - Toggles colliding ball state ! haltSim - Toggles halting the simulation ! about - Displays help about the program ! onMenus - Displays help on the menus ! onScroll - Displays help on setting elasticity and gravity ! onButtons - Displays help on using the mouse buttons to create balls ! onDemos - Displays help on writing a demo ! onParams - Displays help on command-line arguments ! !!!!!!!!!!!!!!!!! XBall.menuDef: \ \ file~\ about,PushButton,about~\ runDemo,PushButton,runDemo~\ loadBitmap,PushButton,loadBitmap~\ separator,Separator~\ quit,PushButton,quit~\ actions~\ clear,PushButton,clear~\ randomize,PushButton,randomize~\ stopDemo,PushButton,stopDemo~\ stepSim,PushButton,stepSim~\ options~\ perpetual,ToggleButton,perpetual~\ ballCollide,ToggleButton,ballCollide~\ haltSim,ToggleButton,haltSim~\ help~\ about,PushButton,about~\ onMenus,PushButton,onMenus~\ onScroll,PushButton,onScroll~\ onButtons,PushButton,onButtons~\ onDemos,PushButton,onDemos~\ onParams,PushButton,onParams~\ xball-3.0.1+dfsg/demo20000644000175000017500000000056114461637417015274 0ustar polveraripolverari# Put up xball bitmap with random balls not colliding in zero gravity # Turn on collide so bitmap image gets destroyed # turn on gravity collide off elasticity 100 load_bitmap xball.xbm 0,0 gravity 0 create_random 30,15 iterate 160 elasticity 50 collide on iterate 50 gravity 40 iterate 10 gravity 50 iterate 10 gravity 60 iterate 10 gravity 70 iterate 100 exit xball-3.0.1+dfsg/.gitignore0000644000175000017500000000010214461637417016322 0ustar polveraripolverarixball *.o autom4te.cache .deps Makefile config.log config.status xball-3.0.1+dfsg/off.xbm0000644000175000017500000000030514461637417015621 0ustar polveraripolverari#define off_width 10 #define off_height 10 static char off_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xball-3.0.1+dfsg/demo130000644000175000017500000000034314461637417015354 0ustar polveraripolverarielasticity 50 load_bitmap xball-x.xbm 10,10 iterate 20 load_bitmap xball-b.xbm 10,10 iterate 20 load_bitmap xball-a.xbm 10,10 iterate 20 load_bitmap xball-l.xbm 10,10 iterate 20 load_bitmap xball-l.xbm 10,10 iterate 200 exit xball-3.0.1+dfsg/color_l.c0000644000175000017500000001417614461637417016147 0ustar polveraripolverari/********************************************************************** * color_l.c - Color list object definition * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #include #include /* Local headers */ #include "color_l.h" #include "misc.h" /* Functions */ static void get_rgb4_names(); /* Public object methods */ /* Constructs the color_list object */ color_list_type color_list__create(filename) char *filename; { color_list_type color_list; color_list = XtNew( color_list_struct); color_list->shaded_4_list = list__create(); get_rgb4_names( color_list, filename); return color_list; } /* Destroys the color_list object */ void color_list__destroy(color_list) color_list_type color_list; { color_type color; /* 2003-04-10 This doesn't work correctly, for ** now, I have just removed the code. It only gets ** called once, so we just waste a little memory. */ return; for (color = color_list__get_last( color_list); color != (color_type)0; color = color_list__get_prev( color_list)) { XtFree( color->name); XtFree( (char *)color); } list__destroy(color_list->shaded_4_list); XtFree( (char *)color_list); } /* Remove a specified node from the colored list */ color_type color_list__remove( color_list, ind) color_list_type color_list; int ind; { return (color_type)list__remove( color_list->shaded_4_list, ind); } /* Returns the number of nodes in the color list */ int color_list__get_count( color_list) color_list_type color_list; { return list__get_count( color_list->shaded_4_list); } /* Private object methods */ /********************************************************************** /* /* get_rgb4_colors - Extract the names of all colors from rgb.txt that /* have 4 shades of the same color. /* /* void get_rgb4_colors( color_list, passed_file_name) /* /* list_type color_list <- a list of found colors /* char * passed_file_name -> The path of the rgb.txt file. If this parameter /* is NULL, the RGB.TXT #define is used. /* /**********************************************************************/ static void get_rgb4_names(color_list, passed_file_name) color_list_type color_list; char *passed_file_name; { FILE *rgb; /* File pointer for rgb.txt */ char colorname[50]; /* Temp color name string */ int r,g,b; color_type color; color_type colors[SHADES]; int color_index; int shade_index; /*** Find the number of system colors */ if (!(rgb = fopen(passed_file_name, "r"))) { /* Problem opening file */ fprintf(stderr,"color_list::get_rgb4_names: Opening rgb.txt file: "); perror(passed_file_name); exit( EXIT_FAILURE); } /* Count the number of 4-shaded colors in the rgb.txt file */ while (4 == fscanf(rgb, "%d %d %d %49[^\n]\n", &r, &g, &b, colorname)) { color = XtNew( color_struct); color->r = r; color->g = g; color->b = b; color->name = XtNewString( colorname); color->last_char = strlen( color->name) - 1; list__add_end( color_list->shaded_4_list, (void *)color); } fclose(rgb); /* Now, remove all colors that do not have color, color2, color3, color4 in the list */ color_index = color_list__get_count( color_list) - 1; while (color_index >= SHADES - 1) { for (shade_index = 0; shade_index < SHADES; shade_index++) { colors[ shade_index] = color_list__get_cell( color_list, color_index - shade_index); if (colors[ shade_index]->name[ colors[ shade_index]->last_char] != '0' + SHADES - shade_index) { /* all 4 colors are not there */ int saveindex = color_index; color_index -= shade_index + 1; while( shade_index >= 0) { XtFree( colors[ shade_index]->name); XtFree( (char *)colors[ shade_index]); color_list__remove( color_list, saveindex + shade_index); shade_index--; } break; } } if (shade_index == SHADES) color_index -= SHADES; } /* delete any remaning colors... */ while (color_index >= 0) { color = color_list__get_cell( color_list, color_index); XtFree( color->name); XtFree( (char *)color); color_list__remove( color_list, color_index); color_index--; } } /* Gets the last node in the color list */ color_type color_list__get_last( color_list) color_list_type color_list; { return (color_type)list__get_last( color_list->shaded_4_list); } /* Get the previous node in the color list */ color_type color_list__get_prev( color_list) color_list_type color_list; { return (color_type)list__get_prev( color_list->shaded_4_list); } #ifdef NOT_USED char *color__get_shade( color, shade_num) color_type color; int shade_num; { color->name[ color->last_char] = '0' + shade_num; return color->name; } /********************************************************************** /* /* is_4_shaded_color - Returns True if the colorname passed is one of /* the colors that has 4 shades. /* /* Bool is_4_shaded_color( colorname) /* /* Bool return <- True if the colorname is a color with 4 shades /* char *colorname -> The colorname to check /* /**********************************************************************/ static Bool is_4_shaded_color( colorname) char *colorname; { /* A color with '4' as it's last character that isn't a /* grey color (e.g. grey14) is how we determine that we /* have found a color that has 4 shades. */ return (colorname[strlen(colorname)-1] == '4' && (strncmp(colorname,"grey",4) != 0 && strncmp(colorname,"gray",4) != 0)); } #endif xball-3.0.1+dfsg/NEWS0000644000175000017500000000035114461637417015037 0ustar polveraripolverari2005-02-23 I have been unable to locate the upstream author of xball and plan to take over this project. If anyone knows the location of the author I would be grateful if you could email me at sgbirch@imsmail.org. Thanks, Steve xball-3.0.1+dfsg/configure.ac0000644000175000017500000000044014461637417016625 0ustar polveraripolverari# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(xball.c) AM_INIT_AUTOMAKE(xball, 3.0.1) AC_DEFINE(MOTIF, HAVE_MOTIF) AC_PROG_CC AC_PROG_RANLIB AC_PROG_INSTALL AC_OUTPUT(Makefile) xball-3.0.1+dfsg/demo50000644000175000017500000000045114461637417015275 0ustar polveraripolverari# Backwards with gravity into xball bitmap visible off collide off elasticity 100 load_bitmap xball.xbm 0,-60 gravity 10 randomize -3,3,0,3 #set_velocity rel 0,1 iterate 20 visible on backwards 21 set_velocity abs 0,0 gravity 0 sleep 1 randomize 10 gravity 20 elasticity 85 iterate 200 exit xball-3.0.1+dfsg/list.c0000644000175000017500000001224214461637417015461 0ustar polveraripolverari/********************************************************************** * list.c - defines a void * list object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include /* Local headers */ #include "list.h" /* Functions */ static void list_double(/* list*/); static void *get_item(/* list, index*/); /* Public object methods */ /* Create the list object */ list_type list__create() { list_type list; list = (list_type)malloc( sizeof( list_struct)); list->count = 0; list->curr_item = 0; list->max_count = LIST_INITIAL_SIZE; list->data = (void **)malloc( sizeof( void *) * list->max_count); return list; } /* Destroy the list object. Items in the list are not freed */ void list__destroy( list) list_type list; { free( list->data); free( list); } /* Add an item to the start of the list */ void *list__add_start( list, data_item) list_type list; void *data_item; { int i; if (list->count == list->max_count) list_double( list); /* Copy all item down by one */ for (i = list->count-1; i > 0; i--) list->data[ i] = list->data[ i - 1]; list->data[ 0] = data_item; list->count++; return data_item; } /* Add an item to the end of the list */ void *list__add_end( list, data_item) list_type list; void *data_item; { if (list->count == list->max_count) list_double( list); list->data[ list->count] = data_item; list->count++; return data_item; } /* Get the first item in the list */ void *list__get_first( list) list_type list; { list->curr_item = 0; return get_item( list, list->curr_item); } /* Get the next item in the list. NULL is returned if there are no more items in the list */ void *list__get_next( list) list_type list; { list->curr_item++; return get_item( list, list->curr_item); } /* Return the last item in the list */ void *list__get_last( list) list_type list; { list->curr_item = list->count - 1; return get_item( list, list->curr_item); } /* Return the previous item in the list. If there are no more items, return NULL. */ void *list__get_prev( list) list_type list; { if (list->curr_item > 0) { list->curr_item--; return get_item( list, list->curr_item); } else return (void *)0; } /* Remove the last item in the list. The item removed is returned. */ void *list__remove_last( list) list_type list; { void *data_item = (void *)0; if (list->count > 0) { list->count--; data_item = list->data[ list->count]; list->data[ list->count] = (void *)0; } return data_item; } /* Remove the first item in the list. The item removed is returned. */ void *list__remove_first( list) list_type list; { int i; void *data_item = (void *)0; if (list->count > 0) { list->count--; data_item = list->data[ 0]; /* Shift data pointers up one */ for (i = 0; i < list->count; i++) list->data[ i] = list->data[ i+1]; list->data[ list->count] = (void *)0; } return data_item; } /* Remove the current item in the list, as positioned by get_first, next, last, prev. The current item is now the item after the one removed */ void *list__remove_curr( list) list_type list; { int i; void *data_item = (void *)0; if (list->curr_item < list->count) { data_item = list->data[ list->curr_item]; for (i = list->curr_item; i < list->count; i++) list->data[ i] = list->data[ i+1]; list->data[ list->count] = (void *)0; } return data_item; } /* Remove an item at the specified position in the list */ void *list__remove( list, ind) list_type list; int ind; { int i; void *data_item = (void *)0; if (ind >= 0 && ind < list->count) { data_item = list->data[ ind]; for (i = ind; i < list->count - 1; i++) list->data[ i] = list->data[ i+1]; list->data[ list->count] = (void *)0; } list->count--; return data_item; } /* Remove all items in the list. The objects are not freed */ void list__remove_all( list) list_type list; { int i; for (i = 0; i < list->count; i++) list->data[ i] = (void *)0; list->count = 0; } /* Private object methods */ /* Return the specified object at a specified position */ static void *get_item( list, ind) list_type list; int ind; { if (ind < list->count) return list->data[ ind]; else return (void *)0; } /* Double the size of the list */ static void list_double( list) list_type list; { int i; /* Double the list's size */ void **tmp_data = list->data; list->max_count *= 2; list->data = (void **)malloc( sizeof( void *) * list->max_count); for (i = 0; i < list->count; i++) list->data[ i] = tmp_data[ i]; free( tmp_data); } xball-3.0.1+dfsg/demo70000644000175000017500000000022114461637417015272 0ustar polveraripolverari# Tall window of raining balls window_width 190 window_height 700 elasticity 80 collide off create_random 50,30 perpetual on iterate 500 exit xball-3.0.1+dfsg/COPYING0000644000175000017500000004311014461637417015373 0ustar polveraripolverari GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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; either version 2 of the License, or (at your option) any later version. 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xball-3.0.1+dfsg/aclocal.m40000644000175000017500000007462014461637417016212 0ustar polveraripolverari# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR xball-3.0.1+dfsg/demo100000644000175000017500000001413214461637417015352 0ustar polveraripolverari# Draw word and then drop it # This demo was made by uncommenting the printf in item.c: item__create. # Then, run xball, redirecting output to your demo file. # Set the gravity to 0, then draw something with mouse button 3. # Quit xball, modify the demo a litlle, and you are dome gravity 0 elasticity 60 window_width 650 create 33,60,0,0 iterate 1 create 33,82,0,0 iterate 1 create 35,108,0,0 iterate 1 create 37,132,0,0 iterate 1 create 39,150,0,0 iterate 1 create 39,164,0,0 iterate 1 create 40,176,0,0 iterate 1 create 41,179,0,0 iterate 1 create 34,58,0,0 iterate 1 create 40,56,0,0 iterate 1 create 62,55,0,0 iterate 1 create 82,55,0,0 iterate 1 create 92,58,0,0 iterate 1 create 108,70,0,0 iterate 1 create 124,86,0,0 iterate 1 create 136,102,0,0 iterate 1 create 139,122,0,0 iterate 1 create 136,140,0,0 iterate 1 create 128,160,0,0 iterate 1 create 122,176,0,0 iterate 1 create 114,186,0,0 iterate 1 create 98,192,0,0 iterate 1 create 82,195,0,0 iterate 1 create 72,196,0,0 iterate 1 create 69,197,0,0 iterate 10 create 147,183,0,0 iterate 10 create 218,185,0,0 iterate 1 create 217,177,0,0 iterate 1 create 217,165,0,0 iterate 1 create 217,153,0,0 iterate 1 create 218,141,0,0 iterate 1 create 218,127,0,0 iterate 1 create 219,115,0,0 iterate 1 create 219,101,0,0 iterate 1 create 218,85,0,0 iterate 1 create 217,73,0,0 iterate 1 create 217,65,0,0 iterate 1 create 218,57,0,0 iterate 1 create 221,53,0,0 iterate 1 create 225,51,0,0 iterate 1 create 231,52,0,0 iterate 1 create 239,60,0,0 iterate 1 create 243,74,0,0 iterate 1 create 247,90,0,0 iterate 1 create 250,106,0,0 iterate 1 create 252,120,0,0 iterate 1 create 255,134,0,0 iterate 1 create 258,146,0,0 iterate 1 create 260,156,0,0 iterate 1 create 263,164,0,0 iterate 1 create 265,167,0,0 iterate 1 create 267,171,0,0 iterate 1 create 269,173,0,0 iterate 1 create 271,175,0,0 iterate 1 create 272,176,0,0 iterate 1 create 274,173,0,0 iterate 1 create 276,163,0,0 iterate 1 create 278,147,0,0 iterate 1 create 278,133,0,0 iterate 1 create 279,123,0,0 iterate 1 create 278,113,0,0 iterate 1 create 276,101,0,0 iterate 1 create 275,91,0,0 iterate 1 create 275,81,0,0 iterate 1 create 275,73,0,0 iterate 1 create 276,69,0,0 iterate 1 create 277,67,0,0 iterate 1 create 278,63,0,0 iterate 10 create 321,134,0,0 iterate 1 create 327,135,0,0 iterate 1 create 337,133,0,0 iterate 1 create 345,131,0,0 iterate 1 create 351,128,0,0 iterate 1 create 353,124,0,0 iterate 1 create 354,118,0,0 iterate 1 create 350,108,0,0 iterate 1 create 348,98,0,0 iterate 1 create 344,95,0,0 iterate 1 create 341,96,0,0 iterate 1 create 333,97,0,0 iterate 1 create 327,100,0,0 iterate 1 create 317,106,0,0 iterate 1 create 309,116,0,0 iterate 1 create 307,128,0,0 iterate 1 create 308,140,0,0 iterate 1 create 312,150,0,0 iterate 1 create 315,160,0,0 iterate 1 create 323,166,0,0 iterate 1 create 335,168,0,0 iterate 1 create 355,170,0,0 iterate 1 create 365,170,0,0 iterate 1 create 365,168,0,0 iterate 1 create 368,168,0,0 iterate 10 create 425,110,0,0 iterate 1 create 419,112,0,0 iterate 1 create 409,116,0,0 iterate 1 create 401,119,0,0 iterate 1 create 395,125,0,0 iterate 1 create 392,131,0,0 iterate 1 create 390,139,0,0 iterate 1 create 392,145,0,0 iterate 1 create 396,153,0,0 iterate 1 create 404,161,0,0 iterate 1 create 407,163,0,0 iterate 1 create 411,165,0,0 iterate 1 create 431,169,0,0 iterate 1 create 447,173,0,0 iterate 1 create 440,57,0,0 iterate 1 create 439,63,0,0 iterate 1 create 437,73,0,0 iterate 1 create 436,85,0,0 iterate 1 create 437,95,0,0 iterate 1 create 438,107,0,0 iterate 1 create 440,119,0,0 iterate 1 create 442,133,0,0 iterate 1 create 445,145,0,0 iterate 1 create 446,153,0,0 iterate 1 create 449,161,0,0 iterate 1 create 453,169,0,0 iterate 1 create 457,173,0,0 iterate 1 create 461,176,0,0 iterate 10 create 521,102,0,0 iterate 1 create 519,103,0,0 iterate 1 create 515,104,0,0 iterate 1 create 509,106,0,0 iterate 1 create 501,109,0,0 iterate 1 create 495,113,0,0 iterate 1 create 489,119,0,0 iterate 1 create 486,129,0,0 iterate 1 create 483,139,0,0 iterate 1 create 482,149,0,0 iterate 1 create 485,155,0,0 iterate 1 create 491,158,0,0 iterate 1 create 503,161,0,0 iterate 1 create 519,163,0,0 iterate 1 create 527,164,0,0 iterate 1 create 531,162,0,0 iterate 1 create 533,56,0,0 iterate 1 create 531,66,0,0 iterate 1 create 529,74,0,0 iterate 1 create 528,82,0,0 iterate 1 create 526,92,0,0 iterate 1 create 527,104,0,0 iterate 1 create 528,114,0,0 iterate 1 create 530,124,0,0 iterate 1 create 532,134,0,0 iterate 1 create 534,144,0,0 iterate 1 create 538,152,0,0 iterate 1 create 541,155,0,0 iterate 1 create 542,155,0,0 iterate 1 create 570,113,0,0 iterate 1 create 582,115,0,0 iterate 1 create 594,115,0,0 iterate 1 create 608,114,0,0 iterate 1 create 618,111,0,0 iterate 1 create 621,107,0,0 iterate 1 create 623,103,0,0 iterate 1 create 621,95,0,0 iterate 1 create 619,89,0,0 iterate 1 create 616,87,0,0 iterate 1 create 610,85,0,0 iterate 1 create 602,85,0,0 iterate 1 create 598,86,0,0 iterate 1 create 595,89,0,0 iterate 1 create 587,97,0,0 iterate 1 create 579,105,0,0 iterate 1 create 573,113,0,0 iterate 1 create 571,121,0,0 iterate 1 create 570,125,0,0 iterate 1 create 570,131,0,0 iterate 1 create 572,135,0,0 iterate 1 create 575,138,0,0 iterate 1 create 583,142,0,0 iterate 1 create 591,145,0,0 iterate 1 create 605,146,0,0 iterate 1 create 619,148,0,0 iterate 1 create 631,149,0,0 iterate 1 create 637,148,0,0 iterate 1 create 640,147,0,0 iterate 1 create 652,155,0,0 iterate 1 create 75,241,0,0 iterate 1 create 119,237,0,0 iterate 1 create 167,233,0,0 iterate 1 create 213,227,0,0 iterate 1 create 253,224,0,0 iterate 1 create 287,223,0,0 iterate 1 create 319,225,0,0 iterate 1 create 337,231,0,0 iterate 1 create 337,233,0,0 iterate 1 create 334,245,0,0 iterate 1 create 331,259,0,0 iterate 1 create 333,261,0,0 iterate 1 create 336,262,0,0 iterate 1 create 346,264,0,0 iterate 1 create 368,266,0,0 iterate 1 create 396,266,0,0 iterate 1 create 430,264,0,0 iterate 1 create 468,260,0,0 iterate 1 create 510,257,0,0 iterate 1 create 564,257,0,0 iterate 1 create 596,254,0,0 iterate 1 create 618,251,0,0 iterate 1 create 656,253,0,0 iterate 1 create 657,253,0,0 iterate 30 set_velocity rel 0,-7 gravity 10 iterate 150 exit xball-3.0.1+dfsg/demo60000644000175000017500000000042014461637417015272 0ustar polveraripolverari# Xball word collides with itself horizontally load_bitmap xball.xbm 0,0 #load_bitmap /usr/include/X11/bitmaps/left_ptr 0,0 collide off set_velocity abs 10,0 gravity 0 elasticity 100 iterate 100 collide on iterate 150 elasticity 80 gravity 30 iterate 300 exit xball-3.0.1+dfsg/file_sel.c0000644000175000017500000001444514461637417016277 0ustar polveraripolverari/********************************************************************** * file_sel.c - Object that asks the user for a filename. * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /********************************************************************** * File_sel Object * * Private Methods: * * XtCallbackProc button_cb * Callback if the user presses a button in the selection dialog. * * * Private Data: * * Bool searching - True while the dialog is up. * char *filename - Filename the user selected. * Widget dialog_w - the dialog widget. * **********************************************************************/ /* System headers */ #include #include #ifdef MOTIF #include #include #endif /* Local headers */ #include "file_sel.h" #include "miscx.h" #include "names.h" /* Functions */ static void display_dialog(/* file_sel, title*/); /* Create the file_sel object */ file_sel_type file_sel__create(toplevel) Widget toplevel; { file_sel_type file_sel = XtNew( file_sel_struct_type); file_sel->toplevel = toplevel; file_sel->searching = False; file_sel->filename = (char *)0; file_sel->dialog_w = (Widget)0; return file_sel; } /********************************************************************** * file_sel__free - Free data associated with file_sel object * * void file_sel__free( file_sel_type file_sel) * * * file_sel - the file_sel object * **********************************************************************/ void file_sel__destroy(file_sel) file_sel_type file_sel; { if (file_sel->filename != (char *)0) { XtFree( file_sel->filename); } if (file_sel->dialog_w != (Widget)0) { XtDestroyWidget( file_sel->dialog_w); } XtFree( (char *)file_sel); } /********************************************************************** * file_sel__display - Display the file selection box and return selected file * * char *file_sel__display(file_sel_type file_sel, char *title) * * * file_sel - the file_sel object * title - the string used for the dialog's popup window title * Returns - the filename selected by the user, or (char *)0 if canceled * * Description: * If the title is (char *)0, a default title will be used. * the returned string is not to be freed by the caller. * The method only returns when the user is done with the dialog. * **********************************************************************/ char *file_sel__display(file_sel, title) file_sel_type file_sel; char * title; { /* Free filename if it was set in previous calls */ if (file_sel->filename != (char *)0) { XtFree(file_sel->filename); file_sel->filename = (char *)0; } /* Display dialog to user and set the filename member */ display_dialog( file_sel, title); return file_sel->filename; } /* Private object methods */ #ifdef MOTIF static void button_cb(/*w, file_sel, call_data*/); static void display_dialog( file_sel, title) file_sel_type file_sel; char * title; { XEvent event; XtAppContext app_context; file_sel->searching = True; if (file_sel->dialog_w == (Widget)0) { file_sel->dialog_w = XmCreateFileSelectionDialog(file_sel->toplevel, FILE_SB, NULL, 0); XtAddCallback(file_sel->dialog_w, XmNcancelCallback, button_cb, (XtPointer)file_sel); XtAddCallback(file_sel->dialog_w,XmNokCallback, button_cb, (XtPointer)file_sel); XtAddCallback(file_sel->dialog_w,XmNhelpCallback, button_cb, (XtPointer)file_sel); } app_context = XtWidgetToApplicationContext( file_sel->dialog_w); if (title == (char *)0) title = "Select File"; XtVaSetValues( file_sel->dialog_w, XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL, XtVaTypedArg, XmNdialogTitle, XmRString, title, sizeof(char *), NULL); XmFileSelectionDoSearch( file_sel->dialog_w, NULL); XtManageChild( file_sel->dialog_w); /* Manage the file selection widget */ /* Keep processing Xt events until one of the callbacks resets the searching data member */ while (file_sel->searching) { XtAppNextEvent(app_context, &event); XtDispatchEvent(&event); } } /********************************************************************** * button_cb - Callback if the user presses a button in the selection dialog. * * XtCallbackProc button_cb * * Description: * Brings down the file selection dialog. * If the OK button was pressed, the selected string is saved. * If the Cancel button was pressed... **********************************************************************/ static void button_cb(w, file_sel, call_data) Widget w; file_sel_type file_sel; XmFileSelectionBoxCallbackStruct *call_data; { XtUnmanageChild(w); /* Bring down the file selection dialog */ switch (call_data->reason) { case XmCR_OK: /* Get the selected filename as a (char *) */ if (!XmStringGetLtoR(call_data->value, XmSTRING_DEFAULT_CHARSET, &file_sel->filename)) /* Internal error - couldn't get the selected filename */ break; if (file_sel->filename[0] == '\0') { /* No string was selected */ XtFree( file_sel->filename); file_sel->filename = (char *)0; } break; case XmCR_HELP: break; case XmCR_CANCEL: break; } file_sel->searching = False; /* Exit file_sel__display() routine */ } #endif #ifdef ATHENA /* Display the file dialog to the user. Call SelFile in filemenu.c */ static void display_dialog( file_sel, title) file_sel_type file_sel; char * title; { SelFile( file_sel->toplevel, /*prompt=*/NULL, /*cancel=*/NULL, /*init_path=*/NULL, /*show_entry=*/NULL, &file_sel->filename); } #endif xball-3.0.1+dfsg/config.sub0000644000175000017500000007535314461637417016336 0ustar polveraripolverari#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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; either version 2 of the License, or # (at your option) any later version. # # 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. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xball-3.0.1+dfsg/item.h0000644000175000017500000000702414461637417015453 0ustar polveraripolverari/********************************************************************** * item.h - item (ball) declaration * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __ITEM_H__ #define __ITEM_H__ #include #include #include "misc.h" #include "intf.h" #define MAX_COLORS 256 #ifndef ELASTICITY #define ELASTICITY 90 /* Default */ #endif /* Static data shared for all items */ typedef struct { int width; int height; int half_width; /* Precalculated for copying pixmap offset */ int half_height; double elasticity; Bool ball_collide; Bool perpetual; Bool visible; char * rgb_txt; Display * display; Window window; Pixel background; GC gc; Pixmap pixmaps[ MAX_COLORS];/* Holds all item drawings */ int num_colors; /* Holds number of colors/pixmaps used */ int curr_pixmap; /* Holds pixmap index to use for next item*/ } item_static_struct_type, *item_static_type; typedef struct { item_static_type static_data; Display *display; Window window; intf x,y; /* Location of items center */ intf y_vel; /* vel < 0 means dropping, > 0 means climbing */ intf x_vel; /* vel < 0 means to left, > 0 means to right */ int rebounded; /* Used to determine if item collision */ /* had already been calculated for this item */ Bool shown; /* True if items image is visible */ Pixmap pixmap; /* Pixel map to use for drawing item */ } item_struct_type, *item_type; item_type item__create(/* display, window, x, y, x_vel, y_vel*/); void item__init(/*display, window, background*/); Bool item__initted(/**/); void item__destroy(/* item*/); void item__draw(/* item*/); void item__undraw(/* item, x, y*/); void item__redraw(/* item*/); void item__erase(/* item*/); void item__redraw(/* item*/); void item__move_pos(/* item, x, y*/); void item__randomize(/* item, min_x_vel, max_x_vel, min_y_vel, max_y_vel*/); void item__move(/* item, room, items*/); void item__rebound_item(/* moved_item, fixed_item*/); void item__set_elasticity_cb(/*w, datap_ptr, call_data*/); int item__get_width(/**/); int item__get_height(/**/); void item__perpetual_mcb(/*w, item, call_data, extra*/); void item__collide_mcb(/*w, item, call_data, extra*/); void item__set_perpetual(/* set */); void item__set_ball_collide(/* set*/); void item__set_visible(/*visible*/);; /* Inline functions */ #define item__set_x_vel( item, vel) ((item)->x_vel = int2intf(vel)) #define item__set_y_vel( item, vel) ((item)->y_vel = int2intf(vel)) #define item__get_x_vel( item) (intf2int((item)->x_vel)) #define item__get_y_vel( item) (intf2int((item)->y_vel)) #define item__get_x( item) (intf2int((item)->x)) #define item__get_y( item) (intf2int((item)->y)) #define item__erase( item) (item__undraw( (item), (item)->x, (item)->y)) #define item__stopped(item, room) \ (item->y_vel == 0) && \ (ABS(item->y) >= room__get_floor(room) - room__get_gravity(room)) && \ (item->x_vel == 0) #endif xball-3.0.1+dfsg/table.h0000644000175000017500000000140414461637417015600 0ustar polveraripolverari/********************************************************************** * file - description * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __TABLE_H__ #define __TABLE_H__ #include "list.h" typedef struct { list_type list; } table_struct_type, *table_type; table_type table__create(); void table__destroy(/* table */); void table__store(/* table, key, data */); void * table__retrieve(/* table, key */); #endif xball-3.0.1+dfsg/menu.c0000644000175000017500000004313114461637417015453 0ustar polveraripolverari/********************************************************************** * menu.c - defines the menu object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #include #include /* For isspace */ #include #include #ifdef MOTIF #include #include #include #include #include #include #endif #ifdef ATHENA #include #include #include #include #include #include #endif /* Local headers */ #include "menu.h" #include "misc.h" #include "table.h" #include "miscx.h" #ifdef ATHENA #include "on.xbm" #include "off.xbm" #endif /* Macros */ #define WPATH_LEN 40 /* File scope variables */ typedef struct { char *menu_def; } app_data,*app_data_ptr; static app_data res_data; static XtResource resources[] = { { "menuDef", "MenuDef", XtRString, sizeof(char *), XtOffset( app_data_ptr, menu_def), XtRString, NULL} }; /* Structures */ typedef struct { char * name; menuCallbackProc proc; caddr_t closure; } menuCallback; typedef struct { char * menu_callback_name; char * optional_params; char * widget_class; } closure_type; /* Functions */ static void menu_callback(/* w, menu, call_data*/); static void create_menus(/*menu, menubar, menu_def*/); static void create_menubar(/* menu, form, name*/); static void set_widget_and_do_callback(/* menu, w, set*/); static void set_widget_state(/* menu, w, state*/); static Widget get_menu_widget(/* menu, widget_name*/); static Bool get_widget_state(/* menu, w*/); static Widget create_pulldown(/* menubar, menu_button_name, pull_down_name*/); static WidgetClass * get_pushbutton_class(/**/); static char * get_pushbutton_callback(/**/); static WidgetClass * get_separator_class(/**/); static char * get_separator_callback(/**/); static WidgetClass * get_togglebutton_class(/**/); static char * get_togglebutton_callback(/**/); /* Public object methods */ /* Create the menu object. The menubar definition resource is loaded and used to create the widgets that make up the menu system. */ menu_type menu__create( form) Widget form; { menu_type menu = XtNew( menu_struct_type); menu->mc_table = table__create(); menu->closure_table = table__create(); create_menubar( menu, form, "menuBar"); XtGetApplicationResources(get_toplevel(form), (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); convert_newlines( res_data.menu_def); create_menus( menu, menu->menubar, res_data.menu_def); XtManageChild( menu->menubar); return menu; } /* Destroy the menu system object */ void menu__destroy(menu) menu_type menu; { table__destroy( menu->mc_table); table__destroy( menu->closure_table); XtDestroyWidget( menu->menubar); XtFree( (char *)menu); } /* Registers an avaliable callback. This callback can then be referenced by the menu definition resource. If the callback is referenced, the menuCallbackProc is invoked. */ void menu__add_callback( menu, action_name, menu_callback_proc, user_data) menu_type menu; char *action_name; menuCallbackProc menu_callback_proc; caddr_t user_data; { /* Store avaliable callback into table */ menuCallback *menu_node = XtNew( menuCallback); menu_node->name = my_strdup( action_name); menu_node->proc = menu_callback_proc; menu_node->closure = user_data; table__store( menu->mc_table, menu_node->name, (void *)menu_node); } /* Given the menu item widget name, toggles the widget's state and performs any menu callbacks registered for the callback that the widget references */ void menu__set_toggle( menu, widget_name, set) menu_type menu; char * widget_name; Bool set; { Widget w = get_menu_widget( menu, widget_name); if (w == (Widget)0) return; set_widget_and_do_callback( menu, w, set); } /* Return the state of the named widget's toggle state */ Bool menu__get_toggle( menu, widget_name) menu_type menu; char *widget_name; { Widget w = get_menu_widget( menu, widget_name); if (w == (Widget)0) return False; return get_widget_state( menu, w); } /* Set or unset the sensitivity of the specified menu widget */ void menu__set_sensitivity( menu, widget_name, sensitive) menu_type menu; char * widget_name; Boolean sensitive; { Widget w = get_menu_widget( menu, widget_name); if (w == (Widget)0) return; XtVaSetValues( w, XtNsensitive, sensitive, NULL); } /* Returned the named menu widget, or NULL if not found */ static Widget get_menu_widget( menu, widget_name) menu_type menu; char * widget_name; { Widget w; char widget_path[50]; sprintf(widget_path,"*%s", widget_name); w = XtNameToWidget( menu->menubar, widget_path); if (w == (Widget)0) { fprintf(stderr,"get_menu_widget: Cannot find menu widget '%s'\n", widget_name); } return w; } /* menu_callback Called for any menu item that is selected. Sets up the parameters and makes the callback to the proper menuCallbackProc function. */ static void menu_callback( w, menu, call_data) Widget w; menu_type menu; caddr_t * call_data; { closure_type * closure; menuCallback * mc_node; menuCallbackStruct menu_cbs; /* Get data passed when callback was referenced in menu configuration */ closure = (closure_type *)table__retrieve( menu->closure_table, XtName(w)); if (closure == (closure_type *)0) { fprintf(stderr,"Cannot find menu callback closure for widget %s.\n", XtName(w)); return; } if (strcmp( closure->widget_class, "ToggleButton") == 0) { #ifdef ATHENA /* We have to toggle the athena widget by hand */ set_widget_state( menu, w, !get_widget_state( menu, w)); #endif menu_cbs.set = get_widget_state( menu, w); } else /* Non-toggle button - just put any value there */ menu_cbs.set = True; /* Get the callback information stored when the callback was registered */ mc_node = (menuCallback *)table__retrieve( menu->mc_table, closure->menu_callback_name); if (mc_node == (menuCallback *)0) { fprintf(stderr,"Cannot find menu callback '%s'\n", closure->menu_callback_name); return; } /* Call the menu callback function */ (*mc_node->proc)(w, mc_node->closure, &menu_cbs, closure->optional_params); } /********************************************************************** * Menu config text format: * * XBall.menu: * pulldownName~ * widgetName,widgetClass,menuCallbackName,optionalParams...~ * . * . * . * pulldownName2~ * widgetName,widgetClass,menuCallbackName,optionalParams...~ * . * . * . **********************************************************************/ static void create_menus(menu, menubar, menu_def) menu_type menu; Widget menubar; char * menu_def; { Widget pull_down; Widget button; char pull_down_name[30]; char * curr_pt = menu_def; char * comma; char * newline; char * next_pt; WidgetClass * w_class_p; Arg args[10]; int n; while (curr_pt != NULL) { /*next_pt = strpbrk( curr_pt, "\"{}");*/ /* Search for first non-space */ for (next_pt = curr_pt; next_pt != '\0' && isspace( *next_pt); next_pt++) /* Do nothing*/; if (*next_pt == '\0') break; switch (*next_pt) { case '{': printf("Sorry - '{' not yet implemented\n"); curr_pt = strchr( next_pt, '\n'); /* Go to next line */ break; case '}': printf("Sorry - '}' not yet implemented\n"); curr_pt = strchr( next_pt, '\n'); /* Go to next line */ break; default: comma = strchr( next_pt, ','); newline = strpbrk( next_pt, "\n "); /*newline = strchr( next_pt, '\n');*/ if (newline == NULL || comma == NULL || newline < comma) { /* At a menu header since no commas before the next newline */ char *menu_button_name = get_string( next_pt); sprintf(pull_down_name, "%sPullDown", menu_button_name); pull_down = create_pulldown( menubar, menu_button_name, pull_down_name); free( menu_button_name); curr_pt = strchr( next_pt, '\n'); /* Go to next line */ } else { /* At a menu item. Get the parameters */ char *item_str = get_string( next_pt); char *w_name; char *w_class; char *menu_callback_name; char *optional_params; char *callback; w_name = strtok( item_str, ","); w_class = strtok( (char *)0, ","); menu_callback_name = strtok( (char *)0, ","); optional_params = strtok( (char *)0, "\n"); n = 0; if (strcmp( w_class, "PushButton") == 0) { w_class_p = get_pushbutton_class(); callback = get_pushbutton_callback(); } else if (strcmp( w_class, "Separator") == 0) { w_class_p = get_separator_class(); callback = get_separator_callback(); } else if (strcmp( w_class, "ToggleButton") == 0) { w_class_p = get_togglebutton_class(); callback = get_togglebutton_callback(); #ifdef ATHENA /* Need to initialize some values for the athena toggle */ XtSetArg(args[n], XtNleftBitmap, menu->off_bitmap); n++; XtSetArg(args[n], XtNleftMargin, off_width+4); n++; XtSetArg(args[n], XtNvertSpace, 50); n++; #endif } button = XtCreateManagedWidget( w_name, *w_class_p, pull_down, args, n); if (callback != (char *)0) { closure_type * closure; if (optional_params == (char *)0) optional_params = ""; closure = (closure_type *)XtNew( closure_type); closure->menu_callback_name= my_strdup(menu_callback_name); closure->optional_params = my_strdup( optional_params); closure->widget_class = my_strdup( w_class); XtAddCallback( button, callback,menu_callback, (XtPointer)menu); table__store( menu->closure_table, w_name,(void *)closure); } free( item_str); curr_pt = strchr( next_pt, '\n'); /* Go to next line */ } break; } } } /* Private object methods */ #ifdef MOTIF static void create_menubar( menu, form, name) menu_type menu; Widget form; char * name; { menu->menubar = XmCreateMenuBar( form, name, NULL, 0); } /* Sets the toggle widget to the specified value and performs menu callbacks to inform of the new value */ static void set_widget_and_do_callback( menu, w, set) menu_type menu; Widget w; Bool set; { set_widget_state( menu, w, set); XtCallCallbacks( w, XmNvalueChangedCallback, (char *)0); } /* Ser the state of the Motif menu "toggle" widget */ static void set_widget_state( menu, w, state) menu_type menu; Widget w; Bool state; { XtVaSetValues( w, XmNset, state, NULL); } /* Returns the state of the Motif menu widget */ static Bool get_widget_state( menu, w) menu_type menu; Widget w; { return XmToggleButtonGadgetGetState( w); } /* Create the pull down menu for Motif. If the menu_button is named "help", it is designated the menu help button. */ static Widget create_pulldown( menubar, menu_button_name, pull_down_name) Widget menubar; char * menu_button_name; char * pull_down_name; { Widget pull_down; Widget button; pull_down = XmCreatePulldownMenu( menubar, pull_down_name, NULL, 0); button = XtVaCreateManagedWidget( menu_button_name, xmCascadeButtonWidgetClass, menubar, XmNsubMenuId, pull_down, NULL); if (strcmp( menu_button_name, "help") == 0) { XtVaSetValues(menubar, XmNmenuHelpWidget, button, NULL); } return pull_down; } static WidgetClass * get_pushbutton_class() { return &xmPushButtonGadgetClass; } static char * get_pushbutton_callback() { return XmNactivateCallback; } static WidgetClass * get_separator_class() { return &xmSeparatorGadgetClass; } static char * get_separator_callback() { return (char *)0; } static WidgetClass * get_togglebutton_class() { return &xmToggleButtonGadgetClass; } static char * get_togglebutton_callback() { return XmNvalueChangedCallback; } #endif #ifdef ATHENA menu_type global_action_menu; /* We need to have a global menu object, because actions do not pass client_data */ static void menu_action(/* w, event, params, num_params*/); static void create_menubar( menu, form, name) menu_type menu; Widget form; char * name; { XtActionsRec action; menu->menubar = XtVaCreateManagedWidget( name, boxWidgetClass, form, XtNorientation, XtorientHorizontal, XtNresizable, True, NULL); menu->off_bitmap = XCreateBitmapFromData( XtDisplay( form), RootWindowOfScreen( XtScreen( form)), off_bits, off_width, off_height); menu->on_bitmap = XCreateBitmapFromData( XtDisplay( form), RootWindowOfScreen( XtScreen( form)), on_bits, on_width, on_height); global_action_menu = menu; /* Add a global action for menu actions */ /* Athena needs global actions to implement "menu accelerators" */ action.string = "menu_action"; action.proc = menu_action; XtAppAddActions( XtWidgetToApplicationContext( menu->menubar), &action, (Cardinal)1); } /* Sets the toggle widget to the specified value and performs menu callbacks to inform of the new value */ static void set_widget_and_do_callback( menu, w, set) menu_type menu; Widget w; Bool set; { /* We set the toggle to the opposite of what we finally want, because of the way the Athena menu callback works with toggles is that it toggles the value for each callback. */ set_widget_state( menu, w, !set); XtCallCallbacks( w, XtNcallback, (char *)0); } /* Set the state of the athena menu "toggle" widget */ static void set_widget_state( menu, w, state) menu_type menu; Widget w; Bool state; { XtVaSetValues(w, XtNleftBitmap, state ? menu->on_bitmap : menu->off_bitmap, NULL); } /* Returns the state of the Athena menu "toggle" widget */ static Bool get_widget_state( menu, w) menu_type menu; Widget w; { Pixmap pixmap_set; XtVaGetValues( w, XtNleftBitmap, &pixmap_set, NULL); return (pixmap_set == menu->on_bitmap); } /* Create the Athena pulldown widget */ static Widget create_pulldown( menubar, menu_button_name, pull_down_name) Widget menubar; char * menu_button_name; char * pull_down_name; { Widget button; Widget pull_down; button = XtVaCreateManagedWidget( menu_button_name, menuButtonWidgetClass, menubar, NULL); pull_down = XtCreatePopupShell( "menu", simpleMenuWidgetClass, button, NULL, 0); return pull_down; } static WidgetClass * get_pushbutton_class() { return &smeBSBObjectClass; } static char * get_pushbutton_callback() { return XtNcallback; } static WidgetClass * get_separator_class() { return &smeLineObjectClass; } static char * get_separator_callback() { return (char *)0; } static WidgetClass * get_togglebutton_class() { return &smeBSBObjectClass; } static char *get_togglebutton_callback() { return XtNcallback; } /* This global action is used to implement keyboard accelerators in Athena. To get a keyboard accelerator, a widget sets it translations to call the global "menu_callback" action, passing the menu action they want to perform. */ static void menu_action( w, event, params, num_params) Widget w; XEvent * event; String * params; Cardinal num_params; { char buff[50]; menu_type menu = global_action_menu; /* Get the action name passed to the menu_action */ if (num_params < 1) { fprintf(stderr, "No menu action name passed to the menu_action action\n"); return; } /* Type of menu action is passed to the action */ w = get_menu_widget( menu, params[0]); if (w == (Widget)0) return; menu_callback( w, menu, NULL); } #endif xball-3.0.1+dfsg/demo10000644000175000017500000000054614461637417015276 0ustar polveraripolverari# Load a bitmap, randomize, and let fall through once. collide off perpetual off load_bitmap xball.xbm 10,10 #load_bitmap /usr/include/X11/bitmaps/left_ptr 0,0 gravity 0 iterate 50 sleep 1 gravity 10 randomize -10,10,-10,10 perpetual on iterate 30 elasticity 80 gravity 30 iterate 200 perpetual off iterate 200 exit xball-3.0.1+dfsg/AUTHORS0000644000175000017500000000024414461637417015411 0ustar polveraripolverariXball Authors xball: David Nedde act_area.c: Written by Dan Heller filemenu.c: Po Cheung Debian Packaging: Stephen Birch xball-3.0.1+dfsg/xball.c0000644000175000017500000000717314461637417015617 0ustar polveraripolverari/********************************************************************** /* XBall.c - Written by David Nedde (daven@ivy.wpi.edu) 5/93 /* Features: Motif or Athena widget interface /* Item collision detection /* Window resize -> boundry change /* Kind-of Randomly colored balls /* Shaded 3-D-looking balls /* Different ball creation algorithms /* /* Copyright 1991, 1993 David Nedde /* * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. /**********************************************************************/ /* System Headers */ #include #include /* Local headers */ #include "xball_sys.h" #include "miscx.h" #include "patchlevel.h" /*** Start of main program ***/ main(argc,argv) unsigned argc; char **argv; { /* Use the app-defaults file as a set of strings for the fallback */ static String fallback_resources[] = { #include "fallback.h" }; Widget toplevel; XtAppContext app_context; xball_system_type xball_system; static XrmOptionDescRec options[] = { {"-delay", "*delay", XrmoptionSepArg, NULL }, {"-gravity", "*gravity", XrmoptionSepArg, NULL }, {"-elasticity", "*elasticity", XrmoptionSepArg, NULL }, {"-itemWidth", "*itemWidth", XrmoptionSepArg, NULL }, {"-itemHeight", "*itemHeight", XrmoptionSepArg, NULL }, {"-rgbTxt", "*rgbTxt", XrmoptionSepArg, NULL }, {"-help", "*help", XrmoptionNoArg, "True"}, {"-collide", "*collide", XrmoptionNoArg, "True"}, {"-perpetual", "*perpetual", XrmoptionNoArg, "True"}, {"-haltSim", "*haltSim", XrmoptionNoArg, "True"}, {"-demoFile", "*demoFile", XrmoptionSepArg, NULL} }; if (argc > 1 && strncmp(argv[1],"-help", strlen(argv[1])) == 0) { printf("XBall - version %d, patchlevel %d.\n\n", VERSION, PATCHLEVEL); puts("Usage:\n\txball [-options ...]\n\nWhere options include:"); puts(" Option Default Resource Meaning"); puts(" -help Print out this message"); puts(" -delay number 0 delay Default delay setting to slow program"); puts(" -gravity 10 gravity Default gravity setting"); puts(" -elasticity 90 elasticity Default elasticity value"); puts(" -itemWidth 10 itemWidth Width of the drawn item"); puts(" -itemHeight 10 itemHeight Height of the drawn item"); puts(" -collide collide Balls hit each other if specified"); puts(" -perpetual perpetual Balls do not die if specified"); puts(" -haltSim haltSim Starts w/simulation halted if specified"); puts(" -demoFile demoFile A demo file to run at startup"); puts(" -rgbTxt /etc/X11/rgb.txt Path to rgb file"); exit(0); } toplevel = XtAppInitialize(&app_context,"XBall", options, XtNumber( options), &argc, argv, fallback_resources, /*args*/(ArgList)NULL, /*num_args*/(Cardinal)0); setupConverters(); xball_system = xball_system__create( toplevel); XtRealizeWidget(toplevel); XtAppMainLoop(app_context); return 0; } xball-3.0.1+dfsg/good_bitmaps0000644000175000017500000000040114461637417016726 0ustar polveraripolverariA list of bitmaps that are interesting when loaded as balls. These files should be in /usr/include/X11/bitmaps: 2x2 boxes cntr_ptr cross_weave dot keyboard16 left_ptr right_ptr scales sipb star target xlogo11 xlogo16 xlogo32 xball-3.0.1+dfsg/items.c0000644000175000017500000001224514461637417015632 0ustar polveraripolverari/********************************************************************** * items.c - definition of item list object. * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include /* Local headers */ #include "items.h" #include "room.h" #if 0 /* External variables */ extern item_static_type static_data; #endif /* Create the items object */ items_type items__create() { items_type items = (items_type)malloc( sizeof( items_struct_type)); items->list = list__create(); return items; } /* Destroy the items object */ items_type items__destroy(items) items_type items; { items__destroy_all( items); list__destroy( items->list); free( items); } /* Return the first item in the list */ item_type items__get_first( items) items_type items; { return (item_type)list__get_first(items->list); } /* Return the next item in the list */ item_type items__get_next( items) items_type items; { return (item_type)list__get_next(items->list); } /* Add an item to the list of items */ void items__add( items, item) items_type items; item_type item; { list__add_end( items->list, (void *)item); } /* Destroy all items in the item list */ void items__destroy_all( items) items_type items; { item_type item; for (item = (item_type)list__remove_last( items->list); item != (item_type)0; item = (item_type)list__remove_last( items->list)) { item__destroy( item); } } /* Create a new item and add it to the item list */ void items__new_item( items, x, y, x_vel, y_vel) items_type items; int x,y; int x_vel,y_vel; { list__add_end( items->list, (void *)item__create(x, y, x_vel, y_vel)); } /* Perform the iterative simulation movement for all items on the list */ /* If an item dies, destroy it */ void items__move_items( items, room) items_type items; room_type room; { item_type item; /* Move each item on the screen */ for (items->current = 0; items->current < list__get_count( items->list); items->current++) { item = (item_type)list__get_cell(items->list, items->current); item__move( item, room, items); if (item__stopped( item, room)) { list__remove( items->list, items->current); items->current--; item__destroy( item); } } } /* Simulate moving the items backwards count iterations */ /* The iterations are not shown in the screen */ /* Note that gravity and elastivity are not handled */ void items__move_items_backwards( items, room, count) items_type items; room_type room; int count; { item_type item; /* Reverse all items' velocities and erase them from the screen */ for (items->current = 0; items->current < list__get_count( items->list); items->current++) { item = (item_type)list__get_cell(items->list, items->current); item->x_vel = -item->x_vel; item->y_vel = -item->y_vel; item__erase( item); } /* Move them all count iterations (they will go backwards) */ while (count-- > 0) { /* Move each item on the screen */ for (items->current = 0; items->current < list__get_count( items->list); items->current++) { item = (item_type)list__get_cell(items->list, items->current); item__move( item, room, items); } } /* Reverse all the items' velocities again and draw them */ for (items->current = 0; items->current < list__get_count( items->list); items->current++) { item = (item_type)list__get_cell(items->list, items->current); item->x_vel = -item->x_vel; item->y_vel = -item->y_vel; item__draw( item); } } /* Make all items visible or invisible */ void items__set_visible( items, visible) items_type items; Bool visible; { if (visible) item__set_visible( True); for (items->current = 0; items->current < list__get_count( items->list); items->current++) { if (visible) item__draw( (item_type)list__get_cell(items->list,items->current)); else item__erase((item_type)list__get_cell(items->list,items->current)); } if (!visible) item__set_visible( False); } /* Rebound the given item again all items in the item list */ void items__rebound_items( item, items) item_type item; items_type items; { int i; for (i = items->current+1; i < list__get_count( items->list); i++) { item__rebound_item(item, (item_type)list__get_cell(items->list, i)); } } #ifdef DEBUG void items__print( items) items_type items; { int i; for (i = 0; i < list__get_count( items->list); i++) { printf("%4d: ", i); item__print( (item_type)list__get_cell(items->list, i)); } } #endif xball-3.0.1+dfsg/room.h0000644000175000017500000000462014461637417015470 0ustar polveraripolverari/********************************************************************** * room.h - room object declaration * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __ROOM_H__ #define __ROOM_H__ #include #include "item.h" #include "items.h" #include "file_sel.h" #include "intf.h" typedef struct { Widget canvas; Pixel background; int gravity; items_type items; /* List of items in the rooom */ item_type item; /* Item currently being created by user */ file_sel_type file_sel; /* Used to query for a bitmap file */ /* Input state */ int oldx,oldy; int newx,newy; Bool button1,button2,button3; /* Locations of room structures */ intf right_wall; intf left_wall; intf ceiling; intf floor; /* Used to wait for window resize when caused by the program */ Boolean resized; } room_struct_type, *room_type; #ifndef GRAVITY #define GRAVITY 8 /* Default gravity */ #endif room_type room__create(/* form_w */); void room__destroy(/* room */); void room__set_gravity_cb(/*w, room, call_data */); void room__clear_mcb(/*w, room, call_data, extra */); void room__randomize_mcb(/*w, room, call_data, extra */); void room__load_bitmap_mcb(/*w, room, call_data, extra */); void room__load_bitmap(/*room, filename, pos_x, pos_y*/); void room__set_height(/*room, height*/); void room__set_width(/*room, width*/); /* Inline functions */ /* Note that values passed and returned are of type intf */ #define room__get_item( room) ((room)->item) #define room__get_ceiling( room) ((room)->ceiling) #define room__get_left_wall( room) ((room)->left_wall) #define room__get_right_wall( room) ((room)->right_wall) #define room__get_floor( room) ((room)->floor) #define room__flush( room) (XFlush( XtDisplay(room->canvas))) /* gravity is of type int */ #define room__get_gravity( room) ((room)->gravity) #define room__set_gravity( room, grav) ((room)->gravity = (grav)) #endif xball-3.0.1+dfsg/bootstrap0000755000175000017500000000016714461637417016310 0ustar polveraripolverari#!/usr/bin/env bash # # Input files are Makefile.am and configure.ac # aclocal automake --gnu --add-missing autoconf xball-3.0.1+dfsg/sim.c0000644000175000017500000001010714461637417015274 0ustar polveraripolverari/********************************************************************** * sim.c - definition of the sim object - controls the simulation * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* Local headers */ #include "sim.h" #include "misc.h" #include "names.h" /* System Headers */ #include #include #include #include #include /* Macros */ #define INVALID_WPID 0 #ifndef DELAY #define DELAY 0 #endif /* Structures */ typedef struct { int delay; } app_data,*app_data_ptr; static app_data res_data; static XtResource resources[] = { { "delay", "Delay", XtRInt, sizeof(int), XtOffset(app_data_ptr,delay), XtRImmediate, (caddr_t)DELAY} }; /* Functions */ static Boolean background_processing(/*sim*/); static int delay(); static int process_invisible_backwards(/*datap_ptr*/); /* Public object methods */ /* Create the simulation object */ sim_type sim__create(w, menu, items, room, demo) Widget w; menu_type menu; items_type items; room_type room; demo_type demo; { sim_type sim = (sim_type)malloc( sizeof( sim_struct_type)); sim->menu = menu; sim->items = items; sim->room = room; sim->demo = demo; XtGetApplicationResources(w, (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); sim->step_simulation = False; sim->delay = res_data.delay; sim->wpid = INVALID_WPID; return sim; } /* Destroys the simulation object */ void sim__destroy(sim) sim_type sim; { XtRemoveWorkProc(sim->wpid); free( sim); } /* Steps the simulation one iteration */ void sim__step_mcb(w, sim, call_data, extra) Widget w; sim_type sim; caddr_t call_data; char * extra; { background_processing( sim); } /* Halts the simulation */ void sim__halt_mcb(w, sim, call_data, extra) Widget w; sim_type sim; menuCallbackStruct * call_data; char * extra; { sim->step_simulation = call_data->set; if (!sim->step_simulation) { /* Stepping currently turned off */ /* Add background processing to perform simulation in real-time */ sim->wpid = XtAppAddWorkProc(XtWidgetToApplicationContext(w), background_processing, (char *)sim); /* The 'Step simulation' menu item is greyed since sim is running */ menu__set_sensitivity( sim->menu, STEP_SIM, /*sensitive=*/False); } else { /* Stepping turned on - remove the work proc if it has been started */ if (sim->wpid != INVALID_WPID) XtRemoveWorkProc(sim->wpid); sim->wpid = INVALID_WPID; /* The 'Step simulation' menu item is ungreyed since sim not running */ menu__set_sensitivity( sim->menu, STEP_SIM, /*sensitive=*/True); } } /* Private object methods */ /* Performs one iteration of the demo and simulation */ static Boolean background_processing(sim) sim_type sim; { room_type room = sim->room; if (demo__running(sim->demo)) demo__process( sim->demo); /* Delay */ delay(); items__move_items( sim->items, room); return /*remove work procedure=*/False; } /* Slow the simulation some amount */ /* Slow more if there are less balls, less if there are more balls */ static int delay( ) { static int first_flag = 1; static struct timeval last = {0,0}; struct timeval tv; struct timezone tz; const int STEP = (10 * 1000); //10mSec gettimeofday(&tv, &tz); if (first_flag) { first_flag = 0; last = tv; } // Compute required delay int delta = tv.tv_usec - last.tv_usec; if (tv.tv_sec != last.tv_sec) { delta += (tv.tv_sec - last.tv_sec) * 1000000; } if (delta < STEP) { usleep(STEP - delta); } last = tv; } xball-3.0.1+dfsg/demo80000644000175000017500000000171314461637417015302 0ustar polveraripolveraricollide on create 200,20,0,0 iterate 40 create 200,20,0,0 iterate 80 create 200,20,0,0 iterate 40 create 200,20,0,0 iterate 40 create 200,20,0,0 iterate 20 create 200,20,0,0 iterate 20 create 200,20,0,0 iterate 10 create 200,20,0,0 iterate 10 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 5 create 200,20,0,0 iterate 50 create 0,0,4,0 iterate 400 exit xball-3.0.1+dfsg/xball-x.xbm0000644000175000017500000000017614461637417016424 0ustar polveraripolverari#define xball_b_width 5 #define xball_b_height 7 static char xball_b_bits[] = { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11}; xball-3.0.1+dfsg/run_demos0000755000175000017500000000046214461637417016264 0ustar polveraripolverari#!/bin/sh echo '*** Xball Demos ***' echo "Hit 'q' in the xball window to exit a demo early" echo "" for f in demo1 demo2 demo3 demo4 demo5 demo6 demo7 demo8 demo9 demo10 demo11 \ demo12 demo13 demo14 do echo "Running demo: $f" xball -demo $f sleep 1 # Let X catch up with events... done xball-3.0.1+dfsg/README0000644000175000017500000000464714461637417015234 0ustar polveraripolverari This program simulates bouncing balls in a window. You create the balls in a variety of ways, and can set the gravity, elasticity, whether balls collide or not, etc. Since the last version, I have added Motif support, 3-d shaded balls, and a demo running facility. Software features user-configurable menus, and a DrawingArea widget for use with other Athena widgets. XBall compiles using either Motif or Athena Widgets (See the Imakefile to select the one you want). It been compiled and run on a Sun Sparc, IBM RS6000, SGI Iris and DecStation 5000, using their standard C compiler. The Athena version works using X11R4 or X11R5. To compile, run xmkmf (and Make Makefiles if Athena widgets used). Then make. A standard Make.motif and Make.athena have been provided if you do not have xmkmf. If you have undefined symbols, such as usleep or regex, see the Imakefile for symbols to define, xmkmf, remove the *.o files, and recompile. All resources are contained within the program as fallback resources, so, it is not strictly neccessary to install the app-defaults file, except that when using Athena widgets, since the keyboard accelertors will not work if the app-defauls file is not installed. To run the included demos, type 'run_demos'. Here are the recommended values for the delay to slow down balls. This delay can be set in the Imakefile, or when run as xball -delay 1000. Sun Sparc 100 IBM RS6000 10000 SGI Iris 100 (Uncomment MYLDLIBS in Imakefile if using Motif) DecStation 5000 180 (Comment out HAVE_USLEEP in Imakefile) Please send bugs, comments, suggestions, and interesting demos to: daven@ivy.wpi.edu. Copying Policy: Copyright 1993 David Nedde Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is granted provided that the above copyright notice appears in all copies. It is provided "as is" without express or implied warranty. Two files have additional copying policies: act_area.c: Written by Dan Heller. Copyright 1991, O'Reilly && Associates. This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. filemenu.c Copyright 1989 The University of Texas at Austin Copyright 1990 Microelectronics and Computer Technology Corporation Author: Po Cheung xball-3.0.1+dfsg/filemenu.c0000644000175000017500000003503714461637417016321 0ustar polveraripolverari/********************************************************************** * filemenu.c * * See SelFile() header for interface description. * * Copyright 1990, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. * * This source is derived from xdbx source with the following disclaimer: **********************************************************************/ /***************************************************************************** * * xdbx - X Window System interface to the dbx debugger * * Copyright 1989 The University of Texas at Austin * Copyright 1990 Microelectronics and Computer Technology Corporation * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that * both that copyright notice and this permission notice appear in * supporting documentation, and that the name of The University of Texas * and Microelectronics and Computer Technology Corporation (MCC) not be * used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The * University of Texas and MCC makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Po Cheung * Created: March 10, 1989 * *****************************************************************************/ /* filemenu.c * * Construct a file menu (directory browser) which allows a user to go * up and down the directory tree, to select files. * The file menu is popped up by the 'file' command button. * Duane Voth (duanev@mcc.com) contributed to the layout of the file menu, * plus some code and ideas. * * changeDir(): Record the current working directory. * InList(): Select files to be displayed in the menu. * ScanDir(): Scan the directory and record selected filenames. * DisplayMenuFile(): Callback for the file menu. * CancelFileMenu(): Pop down the file menu. * SetUpFileMenu(): Create the file menu popupshell. * UpdateFileMenu(): Update entries in the file menu. * File(): Command callback for the 'file' command button. */ #include #include #include #include #include #include #include #include #include #include #include #include #ifdef SUNOS4 #include #else #include #endif /*#include "global.h"*/ #ifdef SUNOS4 typedef struct dirent Directory; #else typedef struct direct Directory; #endif #define MAXPATHLEN 1024 #define LINESIZ 512 #define LASTCH(s) (s[strlen(s)-1]) #define SECLASTCH(s) (s[strlen(s)-2]) #define MAXCOLUMNS 8 /* max number of columns in file menu */ #define MAXARGS 20 /* max number of args */ #define FILES_PER_COL 10 /* # of files per column in file menu */ #define INVALID (-2) #define CANCELED (-1) #define OK 0 static int glob_status; static char **glob_path; static Widget parent_w; char cwd[MAXPATHLEN] = ""; /* current working directory */ static char fileMenuDir[MAXPATHLEN];/* current directory of file menu */ static char **filelist; /* list of file names in fileMenu */ static int nfiles = 0; /* number of files in filelist */ static Widget popupshell, /* parent of popup */ popup, /* vpane widget containing file menu */ fileMenu, /* list widget as file menu */ fileMenuLabel; /* label widget as file menu label */ void File(); static int UpdateFileMenu(); static void CancelFileMenu(); /* Change working directory to 'dir'. * Modify static global variable, cwd, to keep track of * current working directory. */ static void changeDir(dir) char *dir; { int i; if (strcmp(dir, "./") == NULL) return; if (dir[0] == '/' || dir[0] == '~') strcpy(cwd, dir); if (strcmp(dir, "../") == NULL) { for (i=strlen(cwd); cwd[i] != '/' && i > 0; i--); cwd[i] = '\0'; if (strcmp(cwd, "") == NULL) strcpy(cwd, "/"); } else { sprintf(cwd, "%s/%s", cwd, dir); LASTCH(cwd) = '\0'; } } /* Determines if a directory entry should appear in the file menu. * The files included in the menu are : * .. (parent directory) * directories * text files * executable files */ static int InList(entry) Directory *entry; { char pathname[LINESIZ]; struct stat statbuf; if (strcmp(entry->d_name, ".") == NULL || /* ignore current directory */ LASTCH(entry->d_name) == '~' || /* ignore Emacs backup files */ entry->d_name[0] == '#' || /* Ignore emacs backup files */ (LASTCH(entry->d_name) == 'o' && SECLASTCH(entry->d_name) == '.')) /* ignore object files */ return False; if (entry->d_name[0] == '.' && entry->d_name[1] != '.') return False; /* ignore hidden files */ if (strcmp(cwd, "")) /* give full path name */ sprintf(pathname, "%s/%s", cwd, entry->d_name); else strcpy(pathname, entry->d_name); if (stat(pathname, &statbuf) == -1) return False; if (statbuf.st_mode & S_IFDIR) { /* is directory */ strcat(entry->d_name, "/"); ++(entry->d_namlen); return True; } if (statbuf.st_mode & S_IEXEC) { /* is executable */ strcat(entry->d_name, "*"); ++(entry->d_namlen); return True; } return True; } /* Scans the working directory for files selected by InList(), sorted * alphabetically, and stored in an array of pointers to directory * entries called namelist. * The names of the selected files are stored in filelist. */ static int ScanDir(dir) char *dir; { extern alphasort(); Directory **namelist; int i, j; char *format_static(); nfiles = scandir(dir, &namelist, InList, alphasort); if (nfiles <= 0) { XBell(XtDisplay(popupshell),0); return(INVALID); } if (filelist) { for (i=0; filelist[i]; i++) XtFree(filelist[i]); XtFree((char *)filelist); } filelist = (char **) XtMalloc((nfiles+1) * sizeof(char *)); i = 0; for (j=0; jd_name); XtFree((char *)namelist[j]); } filelist[i++] = NULL; XtFree((char *)namelist); return(OK); } /* Delete the current directory prefix from the passed path */ char *remove_current_prefix(path) char *path; { char wd[MAXPATHLEN]; char *temp_str; getwd(wd); if (!strncmp(wd,path,strlen(wd))) { /* wd matches path prefix */ temp_str = &path[strlen(wd)]; if (temp_str[0] == '/') /* If first char of prefix is a '/', * * remove it since we want a relative path */ temp_str++; return(temp_str); } /* Couldn't find the prefix -- return the whole path */ return(path); } /* Callback for the fileMenu list widget. * > if the selected item is a directory, display contents of that directory. * > if the selected item is a readable file, return the file name */ /* ARGSUSED */ static void DisplayMenuFile(w, popupshell, call_data) Widget w; Widget popupshell; XawListReturnStruct *call_data; { char *filename; XtPopdown(popupshell); filename = call_data->string; if (filename == NULL) return; if (LASTCH(filename) == '/') { changeDir(filename); XtDestroyWidget(popupshell); if (UpdateFileMenu() == INVALID) changeDir("../"); /* create new menu */ File(w,(XtPointer )0,(XtPointer )0); /* pop it up */ } else { *glob_path = XtMalloc(strlen(filename)+strlen(cwd)+2); strcpy(*glob_path, remove_current_prefix(cwd)); if (strlen(*glob_path) != 0) strcat(*glob_path, "/"); strcat(*glob_path, filename); glob_status = OK; } } /* Callback to popdown the file menu */ /* ARGSUSED */ static void CancelFileMenu(w, popupshell, call_data) Widget w; Widget popupshell; XtPointer call_data; { XtPopdown(popupshell); glob_status = CANCELED; } void DisableWindowResize(w) Widget w; { Arg args[MAXARGS]; Cardinal n; Dimension height; n = 0; XtSetArg(args[n], XtNheight, &height); n++; XtGetValues(w, args, n); XawPanedSetMinMax(w, height, height); XawPanedAllowResize(w, False); } /* Creates a popup shell with its child being a vpane widget containing * a file menu label, a file menu containing file names returned from * ScanDir(), and a cancel command button. * When an item in the list is selected, DisplayMenuFile is called. */ static int SetUpFileMenu(dir) char *dir; { Widget cancelButton; Arg args[MAXARGS]; Cardinal n; char menulabel[LINESIZ]; int ncolumns; n = 0; popupshell = XtCreatePopupShell("File Directory", transientShellWidgetClass, parent_w, args, n); n = 0; popup = XtCreateManagedWidget("popup", panedWidgetClass, popupshell, args, n); if (ScanDir(dir) == OK) /* It worked OK */ strcpy(fileMenuDir, dir); else return(INVALID); n = 0; sprintf(menulabel, " %s ", dir); XtSetArg(args[n], XtNlabel, (XtArgVal) menulabel); n++; XtSetArg(args[n], XtNjustify, (XtArgVal) XtJustifyCenter); n++; fileMenuLabel = XtCreateManagedWidget("fileMenuLabel", labelWidgetClass, popup, args, n); n = 0; ncolumns = nfiles/FILES_PER_COL + 1; ncolumns = MIN(ncolumns, MAXCOLUMNS); XtSetArg(args[n], XtNlist, filelist); n++; XtSetArg(args[n], XtNverticalList, True); n++; XtSetArg(args[n], XtNdefaultColumns, (XtArgVal) ncolumns); n++; fileMenu = XtCreateManagedWidget("fileMenu", listWidgetClass, popup, args, n); XtAddCallback(fileMenu, XtNcallback, DisplayMenuFile,(XtPointer)popupshell); n = 0; XtSetArg(args[n], XtNresize, False); n++; XtSetArg(args[n], XtNlabel, "CANCEL"); n++; cancelButton = XtCreateManagedWidget("cancelButton", commandWidgetClass, popup, args, n); XtAddCallback(cancelButton, XtNcallback, CancelFileMenu, (XtPointer)popupshell); DisableWindowResize(fileMenuLabel); DisableWindowResize(cancelButton); return(OK); } /* This routine is called when there is a a change in current directory. * It destroys the existing popup shell and creates a new file menu based * on the new current directory. A new directory list is created. */ static int UpdateFileMenu() { return(SetUpFileMenu(cwd)); } /* File command button callback. */ /* ARGSUSED */ void File(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { Arg args[MAXARGS]; Cardinal n; Dimension fileMenu_width, fileMenuLabel_width, border_width; Dimension fileMenu_height, fileMenuLabel_height; Dimension dialog_width, dialog_height; int width, height; int x_offset, y_offset; Position x,y; /* if (strcmp(fileMenuDir, cwd))*/ if (UpdateFileMenu() != OK) return; n = 0; XtSetArg(args[n], XtNwidth, &fileMenu_width); n++; XtSetArg(args[n], XtNheight, &fileMenu_height); n++; XtSetArg(args[n], XtNborderWidth, &border_width); n++; XtGetValues(fileMenu, args, n); n = 0; XtSetArg(args[n], XtNwidth, &fileMenuLabel_width); n++; XtSetArg(args[n], XtNheight, &fileMenuLabel_height); n++; XtGetValues(fileMenuLabel, args, n); /* Place the popup window centered on parent */ n = 0; XtSetArg(args[n], XtNwidth, &dialog_width); n++; XtSetArg(args[n], XtNheight, &dialog_height); n++; XtGetValues(parent_w, args, n); width = MAX(fileMenu_width, fileMenuLabel_width); x_offset = (Position) (dialog_width - width - border_width) / 2; height = fileMenu_height + fileMenuLabel_height; y_offset = (Position) (dialog_height - height - border_width) / 2; XtTranslateCoords(parent_w, x_offset, y_offset, &x, &y); x = MAX(0, x); y = MAX(0, y); n = 0; XtSetArg(args[n], XtNx, x); n++; XtSetArg(args[n], XtNy, y); n++; XtSetValues(popupshell, args, n); /*XtManageChild( popupshell);*/ XtPopup(popupshell, XtGrabNonexclusive); /*UpdateMessageWindow("Select a file or directory");*/ } /********************************************************************** * SelFile * * Pop up a window, letting the user select a file. When the file * is selected, the string is returned to the caller. * * If the init_path is NULL and this is the first call, the current * directory is used, else the previous call's directory is used. * If the init_path is an empty string, the current directory is used. * A passed init path will have the current dir prepended if the path * doesn't start with a '/'. * If the popup is canceled, -1 is returned, otherwise 0 is returned. **********************************************************************/ int SelFile(w,prompt,cancel,init_path,show_entry,path_return) Widget w; char *prompt; /* Not used yet */ char *cancel; /* Not used yet */ char *init_path; int *(*show_entry)(); /* Not used yet */ char **path_return; { XtAppContext app_context; XEvent event; parent_w = w; glob_path = path_return; if (init_path == (char *)0 || init_path[0] == '\0') { /* No init_path -- Use the current working directory */ if (cwd[0] == '\0' || init_path == (char *)0 || init_path[0] == '\0') getwd(cwd); } else if (strcmp(cwd,init_path)) { /* They are different -- copy requested starting dir in */ /* Prefix with wd if init_path is a relative path */ if (init_path[0] != '/') { getwd(cwd); strcat(cwd,"/"); } else cwd[0] = '\0'; strcat(cwd,init_path); } glob_status = INVALID; File(w, (XtPointer )0, (XtPointer )0); app_context = XtWidgetToApplicationContext( w); while (glob_status == INVALID) { XtAppNextEvent(app_context, &event); XtDispatchEvent(&event); } return(glob_status); } xball-3.0.1+dfsg/ChangeLog0000644000175000017500000000010414461637417016106 0ustar polveraripolverariAll changes for xball are documented in the Debian changelog file. xball-3.0.1+dfsg/config.guess0000644000175000017500000012470214461637417016664 0ustar polveraripolverari#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-11-12' # This file 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; either version 2 of the License, or # (at your option) any later version. # # 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. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; luna88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms && exit 0 ;; I*) echo ia64-dec-vms && exit 0 ;; V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xball-3.0.1+dfsg/demo.c0000644000175000017500000003351514461637417015440 0ustar polveraripolverari/********************************************************************** * demo.c - defines the demo object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #include #ifdef MOTIF #include #endif /* Local headers */ #include "demo.h" #include "names.h" #include "intf.h" #include "miscx.h" /* Structures */ typedef struct { char *demo_file; } app_data,*app_data_ptr; static app_data res_data; static XtResource resources[] = { { "demoFile", "DemoFile", XtRString, sizeof(char *), XtOffset( app_data_ptr, demo_file), XtRString, NULL} }; /* Functions */ static void demo_start(/* demo*/); /* Public object methods */ /* Create the demo object */ demo_type demo__create( w, menu, gravity, elasticity, file_sel, items, room) Widget w; menu_type menu; scrollbar_type gravity; scrollbar_type elasticity; file_sel_type file_sel; items_type items; room_type room; { demo_type demo = XtNew( demo_struct_type); demo->menu = menu; demo->gravity = gravity; demo->elasticity = elasticity; demo->file_sel = file_sel; demo->items = items; demo->room = room; XtGetApplicationResources(get_toplevel(w), (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); if (res_data.demo_file != 0) { demo->file_name = XtNewString( res_data.demo_file); demo_start( demo); demo->interactive = False; } else { demo->file_name = (char *)0; demo->file_ptr = (FILE *)0; demo->iterations = 0; demo->interactive = True; /* The 'Stop Demo' menu item is greyed since demo is not running */ menu__set_sensitivity( demo->menu, STOP_DEMO, False); } return demo; } /* Destroy the demo object */ void demo__destroy( demo) demo_type demo; { demo__stop( demo); XtFree( (char *)demo); } /* A menu callback (mcb) which queries the user for a filename, and then */ /* loads and runs the selected demo. */ void demo__run_mcb( w, demo, call_data, extra) Widget w; demo_type demo; XtPointer call_data; char * extra; { char *file_name = file_sel__display( demo->file_sel, "Load Demo"); if (file_name != (char *)0) { demo__stop(demo); /* Stop a demo if one is in progress */ demo->file_name = XtNewString(file_name); demo_start( demo); } } /* A menu callback (mcb) which stops the currently running demo */ void demo__stop_mcb( w, demo, call_data, extra) Widget w; demo_type demo; XtPointer call_data; char * extra; { demo__stop( demo); } /* If a demo is running, stops it by reseting the menu sensitivity, and cleaning up the demo file */ void demo__stop( demo) demo_type demo; { if (!demo__running(demo)) return; /* The 'Stop Demo' menu item is greyed since menu is not running */ menu__set_sensitivity( demo->menu, STOP_DEMO, False); /* Set the file_name member to NULL to tell background_processing() that * there is not a demo in progress */ if (demo->file_name != (char *)0) { XtFree( demo->file_name); demo->file_name = (char *)0; } /* Close the demo file */ if (demo->file_ptr != (FILE *)0) { fclose(demo->file_ptr); demo->file_ptr = (FILE *)0; } } /* Returns True if a demo is currently running */ Bool demo__running(demo) demo_type demo; { return demo->file_name != (char *)0; } /* demo language: (have 'quit demo' button) create %d,%d,%d,%d: create a ball with x,y, x & y velocity randomize: randomize velocities of all balls on screen load_bitmap %s %d,%d: load a bitmap to an x,y on the screen set_velocity %s %d,%d: set ball velocities (rel or abs) gravity %d: set gravity to something elasticity %d: set elasticity to something iterate %d: pause for n iterations perpetual on|off: turn perpetual balls on or off collide on|off: turn ball collision on or off item_width %d: change item width item_height %d: change item height window_width %d: Change window width window_height %d: Change window height clear: clear screen create_random %d,%d: create count random balls with a velocity_factor label %s: A label goto %s: Goto label exit: quit the xball program quit: quit the xball program stop: stop demo but leave program alive */ #define MAX_LEN 100 #define is_command(comm) (strncmp(comm,in_line,strlen(comm)) == 0) /* Performs one iteration of the currently running demo */ void demo__process(demo) demo_type demo; { char in_line[MAX_LEN]; /* The current demo file line read in */ /* Used to extract parameters from in_line */ char str[MAX_LEN]; int x,y; int x_vel,y_vel; int width,height; int count; int velocity; item_type item; /* Do not run the demo until the item static data has been initialized */ if (!item__initted()) return; if (demo->iterations > 0) { /* Pause for another iteration */ demo->iterations--; return; } /* Read the next line of the demo */ while (fgets(in_line,MAX_LEN,demo->file_ptr) != (char *)NULL) { if (in_line[0] == '#' || in_line[0] == '\n') { /* Comment */ continue; } else if (is_command("create_random")) { /* create_random %d1,%d2 */ /* create %d1 random balls with a max velocity of %d2 */ sscanf(in_line,"create_random %d,%d", &count, &velocity); for (x = 0; x < count; x++) { items__new_item(demo->items, rand_range(intf2int(room__get_left_wall( demo->room)), intf2int(room__get_right_wall( demo->room))), rand_range(intf2int(room__get_ceiling( demo->room)), intf2int(room__get_floor( demo->room))), rand_range( -velocity, velocity), rand_range( -velocity, velocity)); } } else if (is_command("create")) { /* create %d1,%d2,%d3,%d4 */ /* Create a ball with x,y position %d1,%d2 and an x & y velocity of %d2,%d4 */ sscanf(in_line,"create %d,%d,%d,%d\n", &x,&y, &x_vel,&y_vel); items__new_item(demo->items, x, y, x_vel, y_vel); } else if (is_command("randomize")) { int min_x,max_x,min_y,max_y; /* randomize %d,%d,%d,%d */ /* randomize velocities of all balls on screen with a max velocity of %d */ min_x = max_x = min_y = max_y = 0; sscanf(in_line,"randomize %d,%d,%d,%d", &min_x,&max_x,&min_y,&max_y); for (item = items__get_first( demo->items); item != (item_type)0; item = items__get_next( demo->items)) { item__randomize( item, min_x, max_x, min_y, max_y); } } else if (is_command("load_bitmap")) { /* load_bitmap %s %d1,%d2 */ /* load a bitmap file (where %s is the file path) to an x,y position of %d1,%d2 on the screen */ sscanf(in_line,"load_bitmap %s %d,%d", str,&x,&y); room__load_bitmap(demo->room, str, x, y); } else if (is_command("set_velocity")) { /* set_velocity %s %d1,%d2 */ /* set ball velocities (%s is relative or absolute) to the x and y velocities %d1,%d2 */ sscanf(in_line,"set_velocity %s %d,%d", str,&x_vel,&y_vel); if (strncmp(str,"rel",3) == 0) { for (item = items__get_first( demo->items); item != (item_type)0; item = items__get_next( demo->items)) { item__set_x_vel( item, item__get_x_vel(item) + x_vel); item__set_y_vel( item, item__get_y_vel(item) + y_vel); } } else if (strncmp(str,"abs",3) == 0) { for (item = items__get_first( demo->items); item != (item_type)0; item = items__get_next( demo->items)) { item__set_x_vel( item, x_vel); item__set_y_vel( item, y_vel); } room__flush( demo->room); } else fprintf(stderr, "Unrecognized set_velocity mode '%s'.\nValid modes: 'abs' or 'rel'.\n", str); } else if (is_command("gravity")) { /* gravity %d */ /* set gravity to %d */ int gravity_value; sscanf(in_line,"gravity %d", &gravity_value); scrollbar__set_value( demo->gravity, gravity_value); } else if (is_command("elasticity")) { /* elasticity %d */ /* set elasticity to %d */ int elasticity_value; sscanf(in_line,"elasticity %d", &elasticity_value); scrollbar__set_value( demo->elasticity, elasticity_value); } else if (is_command("iterate")) { /* iterate %d */ /* pause for %d iterations */ sscanf(in_line,"iterate %d", &demo->iterations); if (demo->iterations) /* We are pausing - exit read loop */ return; } else if (is_command("perpetual")) { /* perpetual %s */ /* toggle perpetual (%s is 'on' or 'off') */ sscanf(in_line,"%*s %s", str); menu__set_toggle( demo->menu, PERPETUAL, strcmp("on",str) == 0); } else if (is_command("collide")) { /* collide %s */ /* toggle ball collision (%s is 'on' or 'off') */ sscanf(in_line,"%*s %s", str); menu__set_toggle( demo->menu, BALL_COLLIDE, strcmp("on",str) == 0); } else #if 0 if (is_command("item_size")) { /* item_width %d */ /* change item size to %d,%d */ sscanf(in_line,"item_size %d,%d", &width, &height); items__set_visible( demo->items, False); item__set_size( width, height); items__set_visible( demo->items, True); } else #endif if (is_command("window_width")) { /* window_width %d */ /* Change window width to %d */ sscanf(in_line,"window_width %d", &width); room__set_width( demo->room, width); } else if (is_command("window_height")) { /* window_height %d */ /* Change window height to %d */ sscanf(in_line,"window_height %d", &height); room__set_height( demo->room, (Dimension)height); } else if (is_command("clear")) { /* clear */ /* delete all balls in window */ items__destroy_all( demo->items); } #if 0 else if (is_command("goto") || is_command("label")) { /* goto %s */ /* Goto label %s */ /* label %s */ /* The label %s */ printf("Not implemented\n"); } #endif else if (is_command("exit") || is_command("quit")) { /* exit */ /* quit */ /* quit the xball program */ if (!demo->interactive) { demo__stop( demo); exit(0); } } else if (is_command("stop")) { /* stop */ /* stop demo but leave program alive */ demo__stop( demo); return; } else if (is_command("backwards")) { sscanf(in_line,"backwards %d", &count); items__move_items_backwards( demo->items, demo->room, count); } else if (is_command("visible")) { sscanf(in_line,"visible %s", str); items__set_visible( demo->items, strcmp("on",str) == 0); } else if (is_command("sleep")) { sscanf(in_line,"sleep %u", &count); sleep( (unsigned)count); } else { /* Could not recognize demo command */ in_line[strlen(in_line)-1] = '\0'; /* Kill newline */ printf("Unrecognized command '%s'\n", in_line); } } if (feof(demo->file_ptr)) { /* At the end of the demo file. Stop processing the demo */ demo__stop( demo); } } /* Private object methods */ /* Loads the currently specified demo program and sensitises the stop demo menu */ static void demo_start( demo) demo_type demo; { demo->iterations = 0; /* Start up the demo file */ if ((demo->file_ptr = fopen(demo->file_name, "r")) == (FILE *)0) { /* Problem opening demo file */ fprintf(stderr,"Opening demo file: "); perror( demo->file_name); XtFree( demo->file_name); demo->file_name = (char *)0; return; } else { menu__set_sensitivity( demo->menu, STOP_DEMO, True); } } xball-3.0.1+dfsg/configure0000755000175000017500000040214114461637417016252 0ustar polveraripolverari#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="xball.c" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=xball VERSION=3.0.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' cat >>confdefs.h <<\_ACEOF #define MOTIF HAVE_MOTIF _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim RANLIB!$RANLIB$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 77; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi xball-3.0.1+dfsg/mkinstalldirs0000644000175000017500000000370414461637417017150 0ustar polveraripolverari#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here xball-3.0.1+dfsg/Makefile.in0000644000175000017500000004347214461637417016420 0ustar polveraripolverari# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = xball$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_xball_OBJECTS = xball.$(OBJEXT) color_l.$(OBJEXT) demo.$(OBJEXT) \ file_sel.$(OBJEXT) sim.$(OBJEXT) help.$(OBJEXT) item.$(OBJEXT) \ items.$(OBJEXT) list.$(OBJEXT) menu.$(OBJEXT) misc.$(OBJEXT) \ miscx.$(OBJEXT) room.$(OBJEXT) table.$(OBJEXT) \ xball_sys.$(OBJEXT) scrollbar.$(OBJEXT) xball_OBJECTS = $(am_xball_OBJECTS) xball_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(xball_SOURCES) DIST_SOURCES = $(xball_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ xball_SOURCES = xball.c color_l.c demo.c file_sel.c sim.c \ help.c item.c items.c list.c menu.c misc.c miscx.c room.c \ table.c xball_sys.c scrollbar.c xball_LDADD = -L/usr/X11R6/lib -lXm -lXmu -lXt -lX11 all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) xball$(EXEEXT): $(xball_OBJECTS) $(xball_DEPENDENCIES) @rm -f xball$(EXEEXT) $(LINK) $(xball_LDFLAGS) $(xball_OBJECTS) $(xball_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color_l.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_sel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/item.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/items.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/room.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xball.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xball_sys.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xball-3.0.1+dfsg/misc.h0000644000175000017500000000173214461637417015450 0ustar polveraripolverari/********************************************************************** * misc.h - misc function declarations * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __MISC_H__ #define __MISC_H__ #include char * get_string(/* char *str */); char * my_strdup(/* char *str */); int rand_range(/* min, max*/); void convert_newlines(/* str*/); #define ABS(x) ((x) < 0 ? -(x) : (x)) #define SWAP(x,y,type) { type t; t = (x); (x) = (y); (y) = t; } #undef MIN #undef MAX #define MIN(x,y) ((x) > (y) ? (y) : (x)) #define MAX(x,y) ((x) < (y) ? (y) : (x)) #ifndef EXIT_FAILURE #define EXIT_FAILURE (int)1 #define EXIT_SUCCESS (int)0 #endif #endif xball-3.0.1+dfsg/on.xbm0000644000175000017500000000030214461637417015460 0ustar polveraripolverari#define on_width 10 #define on_height 10 static char on_bits[] = { 0x00, 0x03, 0x80, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x40, 0x00, 0x61, 0x00, 0x23, 0x00, 0x36, 0x00, 0x1c, 0x00, 0x18, 0x00}; xball-3.0.1+dfsg/INSTALL0000644000175000017500000001740514461637417015401 0ustar polveraripolverariBefore you begin compiling, you should create the configure script by running the shall script 'bootstrap'. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. xball-3.0.1+dfsg/gen_fallback0000755000175000017500000000127214461637417016661 0ustar polveraripolverari#!/bin/sh # Usage: gen_fallback app-defaults-file # Generates a list of fallback resources suitable for including # in the fallback resources array # This shellscript just echos each line in the source file with a " at # the beginning of the line, and a ", at the and of the line. echo '/* fallback.h generated by gen_fallback from '$1' - do not edit! */' echo "" cat $1 | awk ' \ BEGIN { first = 1 } \ /\\$/ && first == 0 { printf("%s\n", $0); } \ /\\$/ && first == 1 { first = 0; printf("\"%s\n", $0); } \ $0 !~ /\\$/ && first == 1 { printf("\"%s\",\n", $0); } \ $0 !~ /\\$/ && first == 0 { first = 1 ; printf("\",\n\"%s\",\n", $0); } \ END { printf("NULL\n"); }' xball-3.0.1+dfsg/debian/0000755000175000017500000000000014461637760015564 5ustar polveraripolverarixball-3.0.1+dfsg/debian/changelog0000644000175000017500000001144514461637417017442 0ustar polveraripolverarixball (3.0.1-1) unstable; urgency=low * New upstream release, consolidates all 3.0 patches - Change debhelper compat from 4 to 5 - Change standards version to 3.7.3 - Change to three part numbering, new version is 3.0.1 - Get xball version number from changelog, see rules file for details - Cleanup some of the old pre-autoconf cruft - Fix rules, Lintian was giving debian-rules-ignores-make-clean-error -- Stephen Birch Sun, 9 Dec 2007 22:01:23 +0000 xball (3.0-18) unstable; urgency=low * Remove strange vi file from debian directory, :visual -- Stephen Birch Wed, 21 Nov 2007 22:34:23 +0000 xball (3.0-17) unstable; urgency=low * Apply NMU patch, merge with upstream * Change standards version to 3.7.2 -- Stephen Birch Tue, 20 Nov 2007 00:37:52 +0000 xball (3.0-16.1) unstable; urgency=low * NMU to fix RGB_TXT and all other references to point to /etc/X11/rgb.txt, as it is in x11-common. (Closes: #377652). * Added the demo files to the documentation. -- Margarita Manterola Thu, 13 Jul 2006 19:32:23 -0300 xball (3.0-16) unstable; urgency=high * Update to add patch in "NMU" 3.0-15.1 (closes: #303337) -- Stephen Birch Thu, 14 Apr 2005 11:38:18 +0100 xball (3.0-15.1) unstable; urgency=low * NMU - Thanks Paul for the patch! (SGB) * Adds 'rm -rf .deps' to debian/rules clean (closes: #303337) -- Paul Brossier Wed, 13 Apr 2005 03:09:43 +0100 xball (3.0-15) unstable; urgency=low * Add libxt-dev to build-depends to arm can build -- Stephen Birch Wed, 23 Mar 2005 14:38:15 +0000 xball (3.0-14) unstable; urgency=low * Make demo_start() static declaration (closes: #288656) * Added config.guess and config.sub from automake1.4 * Added content to NEWS and ChaneLog so patch creates them -- Stephen Birch Wed, 23 Feb 2005 08:51:33 +0000 xball (3.0-13) unstable; urgency=low * Use gettimeofday() to compute consistant delay -- Stephen Birch Tue, 21 Dec 2004 15:06:29 +0000 xball (3.0-12) unstable; urgency=low * chmod +x missing to rules (closes: #283269) * Run 'make distclean' from clean target in rules -- Stephen Birch Sun, 28 Nov 2004 08:28:49 -0500 xball (3.0-11) unstable; urgency=low * Fix more automake problems (NEWS and ChangeLog files) -- Stephen Birch Sun, 28 Nov 2004 08:26:19 -0500 xball (3.0-10) unstable; urgency=low * Make configure executable in rules file -- Stephen Birch Thu, 25 Nov 2004 12:48:31 +0000 xball (3.0-9) unstable; urgency=low * More minor changes to makefile system -- Stephen Birch Mon, 22 Nov 2004 17:34:48 +0000 xball (3.0-8) unstable; urgency=low * Run autoconf prior to uploading to debian * Remove automake, autoconf1.9 dependency -- Stephen Birch Mon, 22 Nov 2004 17:09:48 +0000 xball (3.0-7) unstable; urgency=low * hard code automake to automake1.9 (closes: #272239) -- Stephen Birch Mon, 1 Nov 2004 04:41:45 -0500 xball (3.0-6) unstable; urgency=low * Compile againt lesstif2 instead of lesstif (closes: #269285) * Change automaken dependancy to automake -- Stephen Birch Fri, 3 Sep 2004 11:29:57 +0100 xball (3.0-5) unstable; urgency=low * Remove postinst and preinst file, not required * Update rules file to be policy complient * Closes: #244289: Package includes non-free source code. * Closes: #256422: Missing Build-Depends -- Stephen Birch Sun, 27 Jun 2004 11:06:34 +0100 xball (3.0-4) unstable; urgency=low * Change bootstrap to make '/xball-3.0/missing' executable * Add automaken to the list of compile dependencies -- Stephen Birch Sun, 28 Mar 2004 14:27:22 -0500 xball (3.0-3) unstable; urgency=low * Add comment to README telling user where to find program (usr/games) * Re-release with correct orig.tar.gz, removing .svn directories -- Stephen Birch Fri, 26 Mar 2004 11:49:14 -0500 xball (3.0-2) unstable; urgency=low * Move xball binary to /usr/games per 11.11 of policy * Quote all sections of xball.menu to help lintian -- Stephen Birch Fri, 19 Mar 2004 15:31:52 +0000 xball (3.0-1) unstable; urgency=low * Initial Release (closes: 230942) * Define scale_set_value in scrollbar.c to prevent compiler warning * Removed gcc from Build-Depends * Spell checked and improved descriptions * Converted from Imake to GNU automake/autoconf * Remove Makefile and configure from debian sources * Add menu system -- Stephen Birch Sat, 31 Jan 2004 10:55:51 +0000 xball-3.0.1+dfsg/debian/xball.xpm0000644000175000017500000001030514461637417017412 0ustar polveraripolverari/* XPM */ static char * xball_xpm[] = { "32 32 129 2", " c None", ". c #000000", "+ c #565658", "@ c #DBDBDB", "# c #D5D5D5", "$ c #CDCDCD", "% c #C4C4C4", "& c #C9C9C9", "* c #EFEFEF", "= c #FAFAFA", "- c #F6F6F6", "; c #E1E1E1", "> c #D4D4D4", ", c #D8D8D8", "' c #BFBFBF", ") c #727474", "! c #131313", "~ c #080808", "{ c #FFFFFF", "] c #ABABAB", "^ c #9B9B9B", "/ c #E6E6E6", "( c #C0C0C0", "_ c #F2F2F2", ": c #CBCBCB", "< c #B3B3B3", "[ c #C8C8C8", "} c #F0F0F0", "| c #A0A09F", "1 c #7F7F7F", "2 c #A0A0A0", "3 c #707070", "4 c #777777", "5 c #FDFDFD", "6 c #F1F1F1", "7 c #A7A7A7", "8 c #656565", "9 c #525252", "0 c #5D5D5D", "a c #A2A2A2", "b c #E5E5E5", "c c #9E9E9E", "d c #333333", "e c #343434", "f c #797979", "g c #E3E3E3", "h c #8C8F90", "i c #EDEDED", "j c #868686", "k c #2E2E2E", "l c #232323", "m c #404040", "n c #8B8B8C", "o c #DEDEDE", "p c #717171", "q c #3E3E3E", "r c #595959", "s c #AEAEAE", "t c #939393", "u c #AFAFAF", "v c #DDDDDD", "w c #939798", "x c #CFCFCF", "y c #E8E8E8", "z c #8D9192", "A c #EAEAEA", "B c #969696", "C c #7A7A7A", "D c #A9A9A9", "E c #F7F7F7", "F c #E7E7E7", "G c #6C6C6C", "H c #515151", "I c #767676", "J c #F9F9F9", "K c #D1D1D1", "L c #555555", "M c #A1A1A1", "N c #434343", "O c #DADADA", "P c #B0B0B0", "Q c #1F1F1F", "R c #494949", "S c #5C5C5C", "T c #141414", "U c #191919", "V c #757575", "W c #C5C5C5", "X c #292929", "Y c #161616", "Z c #3B3B3B", "` c #F8F8F8", " . c #373737", ".. c #3C3C3C", "+. c #545454", "@. c #101010", "#. c #0F0F0F", "$. c #585858", "%. c #C6C6C6", "&. c #696969", "*. c #BABABA", "=. c #919191", "-. c #4D4D4D", ";. c #BCBCBC", ">. c #6E6E6E", ",. c #6F6F6F", "'. c #929292", "). c #414141", "!. c #3F3F3F", "~. c #7E7E7E", "{. c #9F9F9F", "]. c #B2B2B2", "^. c #505050", "/. c #B1B1B1", "(. c #616161", "_. c #646464", ":. c #AAAAAA", "<. c #CECECE", "[. c #EBEBEB", "}. c #D6D6D6", "|. c #8B8B8B", "1. c #F5F5F5", "2. c #D2D2D2", "3. c #B4B4B4", "4. c #CCCCCC", "5. c #898989", "6. c #E2E2E2", "7. c #535353", "8. c #070808", " . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . + @ @ # $ % & @ * = - ; > , , , , , > & ' ) ! ~ . . ", " . . ' { { { { { { { { { { { { { { { { { { { { { { { . . . ", " . . ] { { { { { { { { { { { { { { { { { { { { { { { . . . ", " . . ^ { { { { { / ( ( / { { { { { { _ : < [ } { { { . . . ", " . . | { { { { { ( 1 1 ( { { { { { { / 2 3 4 ( 5 { { . . . ", " . . | { { { { { ( 1 1 ( { { { { { { 6 7 8 9 0 a b { . . . ", " . . ^ { { { { { / ( ( / { { { { { { { / c 9 d e f g . . . ", " . . h { { { { { { { { { { { { { { { { { i j k l m < . . . ", " . . n { { { { { { { { { { { { { { { { { { o p q r s . . . ", " . . t { { { { { { { { { { { { { { { { { { { g < u v . . . ", " . . ^ { { { { { { { { { { { { { { { { { { { { { { { . . . ", " . . w { { { { { { { { { { { { { { { = o x y { { { { . . . ", " . . z { { { { { { { { { { { { { { { A B C D { { { { . . . ", " . . z { { { { { { { { E F F E { { { F G H I J { { { . . . ", " . . z { { { { { { { { K 3 L M { { { - p N 0 O { { { . . . ", " . . z { { { { { { { { P k Q R { { { { S T U V { { { . . . ", " . . z { { { { { { { { W X Y Z ` { { { .~ ~ ..{ { { . . . ", " . . z { { { { { { { { 6 r d H ; { { { +.@.#.$.{ { { . . . ", " . . h { { { %.3 &.*.{ { =.-.&.$ { { { ;.>.,.' { { { . . . ", " . . h { { { '.).!.~.{ { {.0 0 *.{ { { { { { { { { { . . . ", " . . h { { { ].L ^.a { { /.(._.:.{ { { { { { { { { { . . . ", " . . h { { { * <.: [.{ { }.=.|.' { { { { { { { { { { . . . ", " . . n { { { { { { { { { 1.O 2.[.{ { { { { O 3.4.1.{ . . . ", " . . n { { { { { { { { { { { { { { { { { { {.4 5.6.{ . . . ", " . . ) { { { { { { { { { { { { { { { { { { {.4 5.6.{ . . . ", " . . 7.{ { { { { { { { { { { { { { { { { { O 3.4.1.{ . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . ! 8.. . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . "}; xball-3.0.1+dfsg/debian/xball.menu0000644000175000017500000000025114461637417017551 0ustar polveraripolverari?package(xball):needs="X11" \ section="Games/Toys" \ title="Xball simulation" \ command="/usr/games/xball" \ icon="/usr/share/pixmaps/xball.xpm" xball-3.0.1+dfsg/debian/copyright0000644000175000017500000000431014461637417017514 0ustar polveraripolverariThis package was debianized by Stephen Birch on Thu, 29 Apr 2004 10:59:00 +0100. The original source was taken from a source rpm distributed with SuSE 8.0 (http://www.suse.com). xball is licensed using the following licenses: Upstream Author: David Nedde Copyright 1993 David Nedde Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is granted provided that the above copyright notice appears in all copies. It is provided "as is" without express or implied warranty. One file has additional copying policies: filemenu.c Copyright 1989 The University of Texas at Austin Copyright 1990 Microelectronics and Computer Technology Corporation Author: Po Cheung Copyright 1989 The University of Texas at Austin Copyright 1990 Microelectronics and Computer Technology Corporation Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of The University of Texas and Microelectronics and Computer Technology Corporation (MCC) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The University of Texas and MCC makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Po Cheung Created: March 10, 1989 xball-3.0.1+dfsg/debian/README0000644000175000017500000000053514461637417016446 0ustar polveraripolverarixball for DEBIAN and Ubuntu --------------------------- Per Debian policy recommendations the program is installed in /usr/games (not /usr/bin). That means it is not in the normal PATH. The program can be started either from the window manager menu structure or with the following command: $ /usr/games/xball Stephen Birch xball-3.0.1+dfsg/debian/rules0000755000175000017500000000251114461637417016642 0ustar polveraripolverari#!/usr/bin/make -f # Get xball version number from changelog VERSION = $(shell head -1 debian/changelog | sed -e 's/.*(//' | sed -e 's/).*//') CFLAGS = -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif configure: configure-stamp configure-stamp: dh_testdir chmod +x configure chmod +x missing ./configure \ --prefix=$(CURDIR)/debian/xball \ --exec-prefix=$(CURDIR)/debian/xball/usr touch configure-stamp build: configure-stamp build-stamp build-stamp: dh_testdir $(MAKE) VERSION=$(VERSION) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp dh_clean [ ! -f Makefile ] || $(MAKE) distclean rm -rf .deps install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install cd debian && mv xball/usr/bin xball/usr/games # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_install dh_installdocs dh_installmenu dh_installman xball.man dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure xball-3.0.1+dfsg/debian/install0000644000175000017500000000012314461637417017150 0ustar polveraripolveraridemo[0-9]* *.xbm run_demos /usr/share/xball/ debian/xball.xpm /usr/share/pixmaps/ xball-3.0.1+dfsg/debian/control0000644000175000017500000000122414461637417017165 0ustar polveraripolverariSource: xball Section: games Priority: optional Maintainer: Stephen Birch Build-Depends: debhelper (>= 5), lesstif2-dev, xutils, libxmu-dev, libxt-dev Standards-Version: 3.7.3 Package: xball Architecture: any Section: games Depends: ${shlibs:Depends}, menu Description: Simulate bouncing balls in a window A simple educational game that simulates bouncing balls in a window. Gravity, elasticity, and ability to collide can all be adjusted. . Young children enjoy watching the balls bounce around the screen and are fascinated by the program. This is an ideal program for teaching rudimentary mouse skills to very young children. xball-3.0.1+dfsg/debian/docs0000644000175000017500000000000714461637417016433 0ustar polveraripolverariREADME xball-3.0.1+dfsg/debian/compat0000644000175000017500000000000214461637417016761 0ustar polveraripolverari5 xball-3.0.1+dfsg/missing0000755000175000017500000002403214461637417015741 0ustar polveraripolverari#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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; either version 2, or (at your option) # any later version. # 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. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 xball-3.0.1+dfsg/X11/0000755000175000017500000000000014461637417014712 5ustar polveraripolverarixball-3.0.1+dfsg/X11/Xaw_d/0000755000175000017500000000000014461637417015754 5ustar polveraripolverarixball-3.0.1+dfsg/X11/Xaw_d/Makefile0000644000175000017500000004707014461637417017424 0ustar polveraripolverari# Makefile generated by imake - do not edit! # $XConsortium: imake.c,v 1.89 94/08/12 00:45:51 gildea Exp $ # ----------------------------------------------------------------------- # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.220 94/08/30 17:25:36 matt Exp $ # $XFree86: xc/config/cf/Imake.tmpl,v 3.4 1994/09/24 15:09:46 dawes Exp $ # .SUFFIXES: .i # $XConsortium: Imake.cf,v 1.12 94/03/29 15:42:08 gildea Exp $ # $XFree86: xc/config/cf/Imake.cf,v 3.5 1994/09/24 15:09:40 dawes Exp $ # ----------------------------------------------------------------------- # site-specific configuration parameters that need to come before # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $ # site: $XFree86: xc/config/cf/site.def,v 3.4 1994/05/29 02:01:47 dawes Exp $ # $XFree86: xc/config/cf/xf86site.def,v 3.16 1994/09/25 12:20:24 dawes Exp $ # ----------------------------------------------------------------------- # platform-specific configuration parameters - edit linux.cf to change # platform: $XConsortium: linux.cf,v 1.11 95/01/23 18:32:03 kaleb Exp $ # $XConsortium: lnxLib.rules,v 1.2 94/03/31 11:37:29 gildea Exp $ # $XFree86: xc/config/cf/lnxLib.rules,v 3.5 1994/09/11 06:53:26 dawes Exp $ # $XConsortium: xfree86.cf,v 1.2 94/03/31 11:37:26 gildea Exp $ # $XFree86: xc/config/cf/xfree86.cf,v 3.24 1994/09/25 12:20:27 dawes Exp $ LINKKITDIR = $(USRLIBDIR)/Server XF86SRC = $(SERVERSRC)/hw/xfree86 XF86ACCELSRC = $(XF86SRC)/accel XF86COMSRC = $(XF86SRC)/common XF86CONFIGSRC = $(XF86COMSRC) XF86HWSRC = $(XF86SRC)/common_hw XF86OSSRC = $(XF86SRC)/os-support VGADRIVERSRC = $(XF86SRC)/vga256/drivers VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers MONODRIVERSRC = $(XF86SRC)/mono/drivers S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers XF86INIT = $(XF86COMSRC)/xf86Init.o XF86MINIT = $(XF86COMSRC)/xf86Init_m.o XF86CONFIG = $(XF86CONFIGSRC)/xf86_Option.o XF86COMLIB = $(XF86COMSRC)/libxf86.a XF86OSLIB = $(XF86OSSRC)/libxf86_os.a XF86HWLIB = $(XF86HWSRC)/libxf86_hw.a XF86LIBS = $(XF86INIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB) XF86MLIBS = $(XF86MINIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB) # $XConsortium: xf86.rules,v 1.1 94/03/29 15:34:48 gildea Exp $ # $XFree86: xc/config/cf/xf86.rules,v 3.1 1994/05/30 08:17:53 dawes Exp $ # ----------------------------------------------------------------------- # site-specific configuration parameters that go after # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $ # site: $XFree86: xc/config/cf/site.def,v 3.4 1994/05/29 02:01:47 dawes Exp $ # ----------------------------------------------------------------------- # Imake rules for building libraries, programs, scripts, and data files # rules: $XConsortium: Imake.rules,v 1.197 94/12/05 19:30:41 gildea Exp $ # rules: $XFree86: xc/config/cf/Imake.rules,v 3.11 1995/01/14 10:39:25 dawes Exp $ _NULLCMD_ = @ echo -n PATHSEP = / SHELL = /bin/sh TOP = . CURRENT_DIR = . IMAKE = imake DEPEND = makedepend MKDIRHIER = mkdirhier CONFIGSRC = $(TOP)/config IMAKESRC = $(CONFIGSRC)/imake DEPENDSRC = $(CONFIGSRC)/makedepend IXXSRC = $(UNSUPPORTEDSRC)/programs/ixx IXX = ixx IXXFLAGS = -s BaseObject -m TypeObj -r RequestObj -p Xf IXXINCLUDES = -i '' INCROOT = /usr/X11R6/include USRLIBDIR = /usr/X11R6/lib SHLIBDIR = /usr/X11R6/lib LINTLIBDIR = $(USRLIBDIR)/lint MANPATH = /usr/X11R6/man MANSOURCEPATH = $(MANPATH)/man MANDIR = $(MANSOURCEPATH)1 LIBMANDIR = $(MANSOURCEPATH)3 FILEMANDIR = $(MANSOURCEPATH)5 AR = ar clq BOOTSTRAPCFLAGS = CC = gcc AS = as .SUFFIXES: .cxx CXX = g++ CXXDEBUGFLAGS = -O2 -m486 CXXEXTRA_DEFINES = CXXEXTRA_INCLUDES = CXXIDL_INCLUDES = -I$(TOP)/include CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE CXXOPTIONS = CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) $(CXXIDL_INCLUDES) CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) COMPRESS = compress CPP = /lib/cpp $(STD_CPP_DEFINES) PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) INSTALL = install INSTALLFLAGS = -c LD = ld LEX = flex -l LEXLIB = -lfl YACC = bison -y CCYACC = bison -y LINT = lint LINTLIBFLAG = -C LINTOPTS = -axz LN = ln -s MAKE = make MV = mv CP = cp RANLIB = ranlib RANLIBINSTFLAGS = RM = rm -f MANSUFFIX = 1x LIBMANSUFFIX = 3x FILEMANSUFFIX = 5x TROFF = psroff MSMACROS = -ms TBL = tbl EQN = eqn STD_INCLUDES = STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE EXTRA_LOAD_FLAGS = EXTRA_LDOPTIONS = EXTRA_LIBRARIES = TAGS = ctags SHAREDCODEDEF = SHLIBDEF = SHLIBLDFLAGS = PICFLAGS = -B/usr/bin/jump CXXPICFLAGS = -B/usr/bin/jump PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO INSTPGMFLAGS = -s INSTBINFLAGS = -m 0755 INSTUIDFLAGS = -s -m 4755 INSTLIBFLAGS = -m 0644 INSTINCFLAGS = -m 0444 INSTMANFLAGS = -m 0444 INSTDATFLAGS = -m 0444 INSTKMEMFLAGS = -s -m 4755 PROJECTROOT = /usr/X11R6 TOP_INCLUDES = -I$(INCROOT) CDEBUGFLAGS = -O2 -m486 CCOPTIONS = -ansi -DNO_ASM ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) LDPRELIB = -L$(USRLIBDIR) LDPOSTLIB = LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB) CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB) LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) CCLINK = $(CC) CXXLINK = $(CXX) LDSTRIPFLAGS = -x LDCOMBINEFLAGS = -r DEPENDFLAGS = MACROFILE = linux.cf RM_CMD = $(RM) IMAKE_DEFINES = IRULESRC = $(CONFIGDIR) IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(EXTRA_ICONFIGFILES) # $RCSfile: Motif.rules,v $ $Revision: 1.2 $ $Date: 1994/12/28 23:33:47 $ # ---------------------------------------------------------------------- # X Window System Build Parameters and Rules # $XConsortium: Project.tmpl,v 1.248 95/01/06 19:12:51 gildea Exp $ # $XFree86: xc/config/cf/Project.tmpl,v 3.12 1995/01/25 10:42:48 dawes Exp $ # ----------------------------------------------------------------------- # X Window System make variables; these need to be coordinated with rules BINDIR = /usr/X11R6/bin BUILDINCROOT = $(TOP) BUILDINCDIR = $(BUILDINCROOT)/X11 BUILDINCTOP = .. BUILDLIBDIR = $(TOP)/usrlib BUILDLIBTOP = .. INCDIR = $(INCROOT)/X11 ADMDIR = /usr/adm LIBDIR = $(USRLIBDIR)/X11 FONTDIR = $(LIBDIR)/fonts XINITDIR = $(LIBDIR)/xinit XDMDIR = $(LIBDIR)/xdm TWMDIR = $(LIBDIR)/twm XSMDIR = $(LIBDIR)/xsm NLSDIR = $(LIBDIR)/nls XLOCALEDIR = $(LIBDIR)/locale PEXAPIDIR = $(LIBDIR)/PEX XAPPLOADDIR = $(LIBDIR)/app-defaults FONTCFLAGS = -t INSTAPPFLAGS = $(INSTDATFLAGS) RGB = rgb FONTC = bdftopcf MKFONTDIR = mkfontdir DOCUTILSRC = $(TOP)/doc/util CLIENTSRC = $(TOP)/clients DEMOSRC = $(TOP)/demos XDOCMACROS = $(DOCUTILSRC)/macros.t XIDXMACROS = $(DOCUTILSRC)/indexmacros.t PROGRAMSRC = $(TOP)/programs LIBSRC = $(TOP)/lib FONTSRC = $(TOP)/fonts INCLUDESRC = $(TOP)/X11 SERVERSRC = $(TOP)/programs/Xserver CONTRIBSRC = $(TOP)/../contrib UNSUPPORTEDSRC = $(TOP)/unsupported DOCSRC = $(TOP)/doc RGBSRC = $(TOP)/programs/rgb BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir FONTSERVERSRC = $(PROGRAMSRC)/xfs FONTINCSRC = $(TOP)/include/fonts EXTINCSRC = $(TOP)/include/extensions TRANSCOMMSRC = $(LIBSRC)/xtrans TRANS_INCLUDES = -I$(TRANSCOMMSRC) # $XConsortium: lnxLib.tmpl,v 1.1 94/03/29 15:34:47 gildea Exp $ # $XFree86: xc/config/cf/lnxLib.tmpl,v 3.1 1994/07/16 10:18:41 dawes Exp $ SHLIBLDFLAGS = PICFLAGS = -B/usr/bin/jump XLIBSRC = $(LIBSRC)/X11 SOXLIBREV = 6.0 DEPXONLYLIB = XONLYLIB = -lX11 LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln XLIBONLY = $(XONLYLIB) XEXTLIBSRC = $(LIBSRC)/Xext LBXXEXTLIBSRC = $(TOP)/workInProgress/lbx/lib/Xext XEXEXTLIBSRC = $(LIBSRC)/XExExt SOXEXTREV = 6.0 DEPXEXTLIB = XEXTLIB = -lXext LINTXEXT = $(LINTLIBDIR)/llib-lXext.ln SOXEXTREV = 6.0 DEPLBXXEXTLIB = LBXXEXTLIB = -llbxXext LINTLBXXEXT = $(LINTLIBDIR)/llib-llbxXext.ln DEPXEXEXTLIB = $(USRLIBDIR)/libXExExt.a XEXEXTLIB = -lXExExt LINTXEXEXT = $(LINTLIBDIR)/llib-lXExExt.ln EXTENSIONLIB = $(XEXEXTLIB) $(XEXTLIB) DEPEXTENSIONLIB = $(DEPXEXEXTLIB) $(DEPXEXTLIB) LINTEXTENSION = $(LINTXEXEXT) $(LINTXEXT) LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) XAUTHSRC = $(LIBSRC)/Xau DEPXAUTHLIB = $(USRLIBDIR)/libXau.a XAUTHLIB = -lXau LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln XDMCPLIBSRC = $(LIBSRC)/Xdmcp DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a XDMCPLIB = -lXdmcp LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln XMUSRC = $(LIBSRC)/Xmu SOXMUREV = 6.0 DEPXMULIB = XMULIB = -lXmu LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln OLDXLIBSRC = $(LIBSRC)/oldX DEPOLDXLIB = $(USRLIBDIR)/liboldX.a OLDXLIB = -loldX LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln TOOLKITSRC = $(LIBSRC)/Xt SOXTREV = 6.0 DEPXTOOLONLYLIB = XTOOLONLYLIB = -lXt LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) LINTXTOOLLIB = $(LINTXTOOLONLYLIB) AWIDGETSRC = $(LIBSRC)/Xaw SOXAWREV = 6.0 DEPXAWLIB = XAWLIB = -lXaw LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln XTFSRC = $(TOP)/workInProgress/Xtf SOXTFREV = 0.7 DEPXTFLIB = XTFLIB = -lXtf LINTXTF = $(LINTLIBDIR)/llib-lXtf.ln FRESCOSRC = $(TOP)/workInProgress/Fresco SOFRESCOREV = 0.7 DEPFRESCOLIB = FRESCOLIB = -lFresco LINTFRESCO = $(LINTLIBDIR)/llib-lFresco.ln XILIBSRC = $(LIBSRC)/Xi SOXINPUTREV = 6.0 DEPXILIB = XILIB = -lXi LINTXI = $(LINTLIBDIR)/llib-lXi.ln XTESTLIBSRC = $(LIBSRC)/Xtst SOXTESTREV = 6.0 DEPXTESTLIB = XTESTLIB = -lXtst LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln PEXLIBSRC = $(LIBSRC)/PEX5 SOPEXREV = 6.0 DEPPEXLIB = PEXLIB = -lPEX5 LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln XIELIBSRC = $(LIBSRC)/XIE SOXIEREV = 6.0 DEPXIELIB = XIELIB = -lXIE LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln PHIGSLIBSRC = $(LIBSRC)/PHIGS DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a PHIGSLIB = -lphigs LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a XBSDLIB = -lXbsd LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ICESRC = $(LIBSRC)/ICE SOICEREV = 6.0 DEPICELIB = ICELIB = -lICE LINTICE = $(LINTLIBDIR)/llib-lICE.ln SMSRC = $(LIBSRC)/SM SOSMREV = 6.0 DEPSMLIB = SMLIB = -lSM LINTSM = $(LINTLIBDIR)/llib-lSM.ln FSLIBSRC = $(LIBSRC)/FS DEPFSLIB = $(USRLIBDIR)/libFS.a FSLIB = -lFS LINTFS = $(LINTLIBDIR)/llib-lFS.ln FONTLIBSRC = $(LIBSRC)/font DEPFONTLIB = $(USRLIBDIR)/libfont.a FONTLIB = -lfont LINTFONT = $(LINTLIBDIR)/llib-lfont.ln XPMLIBSRC = $(LIBSRC)/Xpm DEPXPMLIB = $(USRLIBDIR)/libXpm.a XPMLIB = -lXpm LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) XTOP = $(TOP) MTOP = $(TOP) XBUILDINCROOT = $(XTOP) XBUILDINCDIR = $(XBUILDINCROOT)/X11 IMAKE_CMD = $(IMAKE) -DUseInstalled -DUseInstalledMotif -I$(IRULESRC) $(IMAKE_DEFINES) CLIENTSRC = $(XTOP)/clients DEMOSRC = $(XTOP)/demos LIBSRC = $(XTOP)/lib FONTSRC = $(XTOP)/fonts INCLUDESRC = $(XTOP)/X11 SERVERSRC = $(XTOP)/server UTILSRC = $(XTOP)/util EXAMPLESRC = $(XTOP)/examples DOCSRC = $(XTOP)/doc RGBSRC = $(XTOP)/rgb EXTENSIONSRC = $(XTOP)/extensions TOP_INCLUDES = -I$(INCROOT) UIL_INCLUDES = -I$(USRINCDIR)/uil XPM_DEFINES = XPM_TOP = $(PROJECTROOT) XPM_INCLUDES = -I$(XPM_TOP)/include/X11 XPM_LIBS = $(XPMLIB) USRINCDIR = /usr/X11R6/include UIDDIR = $(LIBDIR)/uid TESTSRC = $(MTOP)/tests TESTLIB = $(TESTSRC)/lib GENERALSRCLIB = $(TESTSRC)/General/lib GENERALSRCBIN = $(TESTSRC)/General/bin MANUALSRCLIB = $(TESTSRC)/Manual/lib MANUALSRCBIN = $(TESTSRC)/Manual/bin AUTOSRCLIB = $(TESTSRC)/Auto/lib AUTOSRCBIN = $(TESTSRC)/Auto/bin COMMONPP = $(GENERALSRCBIN)/Commonpp GENRUN = $(GENERALSRCBIN)/Genrun MANRUN = $(GENERALSRCBIN)/Manrun TESTCOMSRC = $(MANUALSRCLIB)/Common MTOOLKITSRC = $(TOOLKITSRC) MINCLUDESRC = $(MTOP)/X11 MLIBSRC = $(MTOP)/lib MCLIENTSRC = $(MTOP)/clients MDEMOSRC = $(MTOP)/demos MWIDGETSRC = $(MLIBSRC)/Xm MRESOURCESRC = $(MLIBSRC)/Mrm UILSRC = $(MCLIENTSRC)/uil UIL = uil DEPUIL = $(BINDIR)/uil XMEXTRA_LIBS = SOXMREV = 1.2 DEPXMONLYLIB = XMONLYLIB = -lXm LINTXMONLY = $(LINTLIBDIR)/llib-lXm.ln XMLIBONLY = $(XMONLYLIB) XMLIB = $(XMLIBONLY) $(XPM_LIBS) DEPXMLIB = $(DEPXMONLYLIB) $(DEPXPMLIB) SOMRMREV = 1.2 DEPMRESOURCELIB = MRESOURCELIB = -lMrm LINTMRESOURCE = $(LINTLIBDIR)/llib-lMrm.ln SOUILREV = 1.2 DEPUILLIB = UILLIB = -lUil LINTUIL = $(LINTLIBDIR)/llib-lUil.ln SOMCOMMONREV = 1.2 DEPTESTCOMLIB = TESTCOMLIB = -lCommon LINTTESTCOM = $(LINTLIBDIR)/llib-lCommon.ln TESTUILCOMLIB = $(TESTCOMSRC)/libCommonUil.a LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln LINTUILLIB = $(UILSRC)/llib-lUil.ln YACCFLAGS = UILFLAGS = RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.Dat STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE -DNO_MESSAGE_CATALOG DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) CONFIGDIR = $(LIBDIR)/config # ----------------------------------------------------------------------- # start of Imakefile # # Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu) # INCLUDES = -I../.. DEMO_SRCS = demo.c DEMO_OBJS = demo.o LOCAL_LIBRARIES = -lXaw_d LDOPTIONS = -L. LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11 all:: libXaw_d.a libXaw_d.a: DrawingA.o $(RM) $@ $(AR) $@ DrawingA.o $(RANLIB) $@ $(_NULLCMD_) SRCS = $(DEMO_SRCS) OBJS = $(DEMO_OBJS) PROGRAM = demo all:: demo demo: $(OBJS) $(DEPLIBS) $(RM) $@ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) install:: demo @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) demo $(DESTDIR)$(BINDIR)/demo install.man:: demo.man @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) demo.man $(DESTDIR)$(MANDIR)/demo.$(MANSUFFIX) depend:: $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) lint: $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) lint1: $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) clean:: $(RM) demo DIST = X11 X11/Xaw_d X11/Xaw_d/DrawingA.c X11/Xaw_d/DrawingA.h X11/Xaw_d/DrawingAP.h X11/Xaw_d/DrawingA.doc X11/Xaw_d/Imakefile X11/Xaw_d/Makefile.std X11/Xaw_d/patchlevel.h X11/Xaw_d/demo.c X11/Xaw_d/README shar: ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d ) tar: ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z ) # ----------------------------------------------------------------------- # common rules for all Makefiles - do not edit .c.i: $(RM) $@ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ emptyrule:: clean:: $(RM_CMD) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* Makefile:: -@if [ -f Makefile ]; then set -x; \ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ else exit 0; fi $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) tags:: $(TAGS) -w *.[ch] $(TAGS) -xw *.[ch] > TAGS # ----------------------------------------------------------------------- # empty rules for directories that do not have SUBDIRS - do not edit install:: @echo "install in $(CURRENT_DIR) done" install.man:: @echo "install.man in $(CURRENT_DIR) done" install.linkkit:: @echo "install.linkkit in $(CURRENT_DIR) done" Makefiles:: includes:: depend:: # ----------------------------------------------------------------------- # dependencies generated by makedepend # DO NOT DELETE demo.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h demo.o: /usr/include/sys/cdefs.h /usr/X11R6/include/X11/StringDefs.h demo.o: /usr/X11R6/include/X11/IntrinsicP.h demo.o: /usr/X11R6/include/X11/Intrinsic.h /usr/X11R6/include/X11/Xlib.h demo.o: /usr/include/sys/types.h /usr/include/linux/types.h demo.o: /usr/include/asm/types.h /usr/X11R6/include/X11/X.h demo.o: /usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h demo.o: /usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/Xresource.h demo.o: /usr/include/string.h /usr/include/features.h demo.o: /usr/X11R6/include/X11/Core.h /usr/X11R6/include/X11/Composite.h demo.o: /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h demo.o: /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/CoreP.h demo.o: /usr/X11R6/include/X11/CompositeP.h demo.o: /usr/X11R6/include/X11/ConstrainP.h /usr/X11R6/include/X11/ObjectP.h demo.o: /usr/X11R6/include/X11/RectObjP.h ../../X11/Xaw_d/DrawingA.h demo.o: /usr/X11R6/include/X11/Xaw/Form.h demo.o: /usr/X11R6/include/X11/Xaw/Command.h demo.o: /usr/X11R6/include/X11/Xaw/Label.h demo.o: /usr/X11R6/include/X11/Xaw/Simple.h demo.o: /usr/X11R6/include/X11/Xmu/Converters.h xball-3.0.1+dfsg/X11/Xaw_d/DrawingA.h0000644000175000017500000000256714461637417017633 0ustar polveraripolverari/* DrawingA.h - Public Header file */ /* Copyright 1990, David Nedde /* /* Permission to use, copy, modify, and distribute this /* software and its documentation for any purpose and without fee /* is granted provided that the above copyright notice appears in all copies. /* It is provided "as is" without express or implied warranty. */ /* Define widget's class pointer and strings used to specify resources */ #ifndef _XawDrawingArea_h #define _XawDrawingArea_h /* Resources ADDED to label widget: Name Class RepType Default Value ---- ----- ------- ------------- exposeCallback Callback Pointer NULL inputCallback Callback Pointer NULL motionCallback Callback Pointer NULL resizeCallback Callback Pointer NULL */ extern WidgetClass drawingAreaWidgetClass; typedef struct _DrawingAreaClassRec *DrawingAreaWidgetClass; typedef struct _DrawingAreaRec *DrawingAreaWidget; /* Resource strings */ #define XtNexposeCallback "exposeCallback" #define XtNinputCallback "inputCallback" #define XtNmotionCallback "motionCallback" #define XtNresizeCallback "resizeCallback" typedef struct _XawDrawingAreaCallbackStruct { int reason; XEvent *event; Window window; } XawDrawingAreaCallbackStruct; /* Reasons */ #define XawCR_EXPOSE 1 #define XawCR_INPUT 2 #define XawCR_MOTION 3 #define XawCR_RESIZE 4 #endif /* _XawDrawingArea_h */ xball-3.0.1+dfsg/X11/Xaw_d/DrawingA.c0000644000175000017500000001202014461637417017607 0ustar polveraripolverari/* DrawingA.c: The DrawingArea Widget Methods */ /* Copyright 1990, David Nedde /* /* Permission to use, copy, modify, and distribute this /* software and its documentation for any purpose and without fee /* is granted provided that the above copyright notice appears in all copies. /* It is provided "as is" without express or implied warranty. */ #include #include #include #include #include static void Initialize(); static void Destroy(); static void Redisplay(); static void input_draw(); static void motion_draw(); static void resize_draw(); static char defaultTranslations[] = ": input() \n : input() \n : input() \n : input() \n : motion() \n : resize()"; static XtActionsRec actionsList[] = { { "input", (XtActionProc)input_draw }, { "motion", (XtActionProc)motion_draw }, { "resize", (XtActionProc)resize_draw }, }; /* Default instance record values */ static XtResource resources[] = { {XtNexposeCallback, XtCCallback, XtRCallback, sizeof(caddr_t), XtOffset(DrawingAreaWidget, drawing_area.expose_callback), XtRCallback, NULL }, {XtNinputCallback, XtCCallback, XtRCallback, sizeof(caddr_t), XtOffset(DrawingAreaWidget, drawing_area.input_callback), XtRCallback, NULL }, {XtNmotionCallback, XtCCallback, XtRCallback, sizeof(caddr_t), XtOffset(DrawingAreaWidget, drawing_area.motion_callback), XtRCallback, NULL }, {XtNresizeCallback, XtCCallback, XtRCallback, sizeof(caddr_t), XtOffset(DrawingAreaWidget, drawing_area.resize_callback), XtRCallback, NULL }, }; DrawingAreaClassRec drawingAreaClassRec = { /* CoreClassPart */ { (WidgetClass) &simpleClassRec, /* superclass */ "DrawingArea", /* class_name */ sizeof(DrawingAreaRec), /* size */ NULL, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ Initialize, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ actionsList, /* actions */ XtNumber(actionsList), /* num_actions */ resources, /* resources */ XtNumber(resources), /* resource_count */ NULLQUARK, /* xrm_class */ FALSE, /* compress_motion */ FALSE, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ Destroy, /* destroy */ NULL, /* resize */ Redisplay, /* expose */ NULL, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, /* CoreClass fields initialization */ { /* change_sensitive */ XtInheritChangeSensitive }, /* SimpleClass fields initialization */ { 0, /* field not used */ }, /* DrawingAreaClass fields initialization */ }; WidgetClass drawingAreaWidgetClass = (WidgetClass)&drawingAreaClassRec; static void Initialize( request, new) DrawingAreaWidget request, new; { if (request->core.width == 0) new->core.width = 100; if (request->core.height == 0) new->core.height = 100; } static void Destroy( w) DrawingAreaWidget w; { XtRemoveAllCallbacks((Widget)w, XtNexposeCallback); XtRemoveAllCallbacks((Widget)w, XtNinputCallback); XtRemoveAllCallbacks((Widget)w, XtNmotionCallback); XtRemoveAllCallbacks((Widget)w, XtNresizeCallback); } /* Invoke expose callbacks */ static void Redisplay(w, event, region) DrawingAreaWidget w; XEvent *event; Region region; { XawDrawingAreaCallbackStruct cb; cb.reason = XawCR_EXPOSE; cb.event = event; cb.window = XtWindow(w); XtCallCallbacks((Widget)w, XtNexposeCallback, (char *)&cb); } /* Invoke resize callbacks */ static void resize_draw(w, event, args, n_args) DrawingAreaWidget w; XEvent *event; char *args[]; int n_args; { XawDrawingAreaCallbackStruct cb; cb.reason = XawCR_RESIZE; cb.event = event; cb.window = XtWindow(w); XtCallCallbacks((Widget)w, XtNresizeCallback, (char *)&cb); } /* Invoke input callbacks */ static void input_draw(w, event, args, n_args) DrawingAreaWidget w; XEvent *event; char *args[]; int n_args; { XawDrawingAreaCallbackStruct cb; cb.reason = XawCR_INPUT; cb.event = event; cb.window = XtWindow(w); XtCallCallbacks((Widget)w, XtNinputCallback, (char *)&cb); } /* Invoke motion callbacks */ static void motion_draw(w, event, args, n_args) DrawingAreaWidget w; XEvent *event; char *args[]; int n_args; { XawDrawingAreaCallbackStruct cb; cb.reason = XawCR_MOTION; cb.event = event; cb.window = XtWindow(w); XtCallCallbacks((Widget)w, XtNmotionCallback, (char *)&cb); } xball-3.0.1+dfsg/X11/Xaw_d/DrawingA.o0000644000175000017500000000327714461637417017641 0ustar polveraripolverari„Ø€ resizemotioninputresizeCallbackmotionCallbackinputCallbackexposeCallbackDrawingAreaU‰å‹E‹U fƒx ufÇB dfƒx"ufÇB"d‰ì]ÃU‰åS‹]h@Sè^ÿÿÿh2SèSÿÿÿh#SèHÿÿÿhSè=ÿÿÿ‹]ü‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh@Rèÿÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPhRèÕþÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh2Rè¥þÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh#Rèuþÿÿ‰ì]Ã: input() : input() : input() : input() : motion() : resize()0`@¸!Œ!2¸!!#¸!”!¸!˜!Oœ` $Ðþ*”˜ž £© ®´ ¹¿ ñ÷ !' QW ‡ |€„ˆŒ”˜ œ ¨ °´ ¸ Ä ÌÐ Ô à èì ð ü  $ (0@HT hl p x €%: G0S``m$xƒ”˜¨`´ÀÉÐÔìgcc2_compiled.___gnu_compiled_c_defaultTranslations_actionsList_input_draw_motion_draw_resize_draw_resources_XtStrings_drawingAreaClassRec_simpleClassRec_Initialize__XtInherit_Destroy_Redisplay_drawingAreaWidgetClass_XtRemoveAllCallbacks_XtCallCallbacksxball-3.0.1+dfsg/X11/Xaw_d/libXaw_d.a0000644000175000017500000000360614461637417017654 0ustar polveraripolverari! __.SYMDEF/ 795059093 0 0 666 69 ` ŠŠ-_drawingAreaClassRec_drawingAreaWidgetClassDrawingA.o/ 795059093 0 0 100644 1727 ` „Ø€ resizemotioninputresizeCallbackmotionCallbackinputCallbackexposeCallbackDrawingAreaU‰å‹E‹U fƒx ufÇB dfƒx"ufÇB"d‰ì]ÃU‰åS‹]h@Sè^ÿÿÿh2SèSÿÿÿh#SèHÿÿÿhSè=ÿÿÿ‹]ü‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh@Rèÿÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPhRèÕþÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh2Rè¥þÿÿ‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh#Rèuþÿÿ‰ì]Ã: input() : input() : input() : input() : motion() : resize()0`@¸!Œ!2¸!!#¸!”!¸!˜!Oœ` $Ðþ*”˜ž £© ®´ ¹¿ ñ÷ !' QW ‡ |€„ˆŒ”˜ œ ¨ °´ ¸ Ä ÌÐ Ô à èì ð ü  $ (0@HT hl p x €%: G0S``m$xƒ”˜¨`´ÀÉÐÔìgcc2_compiled.___gnu_compiled_c_defaultTranslations_actionsList_input_draw_motion_draw_resize_draw_resources_XtStrings_drawingAreaClassRec_simpleClassRec_Initialize__XtInherit_Destroy_Redisplay_drawingAreaWidgetClass_XtRemoveAllCallbacks_XtCallCallbacks xball-3.0.1+dfsg/X11/Xaw_d/demo.o0000644000175000017500000000257214461637417017066 0ustar polveraripolverariøDemoU‰åì¤S‹] èÞÿÿÿjjjSURjjh…\ÿÿÿPè¾ÿÿÿ‰ÃƒÄ$SèSè­ÿÿÿ‹•\ÿÿÿRè¡ÿÿÿ‹Xÿÿÿ‰ì]ÃU‰åWVS‹uƒ=øu@jj‹~`W‹FX‹@Pèjÿÿÿ£ø‹VX‹J‹‘„‹™Œ’Áâ‹T8RPQèAÿÿÿƒÄhZjjjj j ‹=øW‹~`W‹FX‹@PèÿÿÿƒÄ$hZjjjj j ‹=øW‹~`W‹FX‹@Pèïþÿÿeô[^_‰ì]ÃU‰åjèÖþÿÿformcanvasexposeCallbackfromVertQuitU‰åVSjj‹UR‹Rh0è‚þÿÿ‰ÆjhÈhêhÈhhV‹Rh5èXþÿÿ‰ÃƒÄ4jhph<SèAþÿÿjShKV‹RhTè'þÿÿƒÄ(jh hˆPèþÿÿeø[^‰ì]à 2> O [ {’ —» Óä ü  & o uz ˆ ’ ™ Ÿ¤ °µ» ÃÊ ÐÕ ßä ê %ø)/7H`Whwp… ª´ ½ÃÔëö'6Jgcc2_compiled.___gnu_compiled_c_gc_main___main_XtAppInitialize_setup_widgets_XtRealizeWidget_XtAppMainLoop_redisplay_cb_XCreateGC_XSetForeground_XDrawArc_XFillArc_quit_cb_exit_formWidgetClass_XtCreateManagedWidget_XtStrings_drawingAreaWidgetClass_XtVaCreateManagedWidget_XtAddCallback_commandWidgetClassxball-3.0.1+dfsg/X11/Xaw_d/README0000644000175000017500000000114114461637417016631 0ustar polveraripolverariDrawing Area Widget and Demo The drawingArea widget is an Athena-style widget that has callbacks for expose, input, motion and resize events. Included is a demo program that uses the drawingArea widget. To compile and run: xmkmf make If you do not have xmkmf: make -f Makefile.std Copying: Copyright 1993, David Nedde Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is granted provided that the above copyright notice appears in all copies. It is provided "as is" without express or implied warranty. xball-3.0.1+dfsg/X11/Xaw_d/demo.c0000644000175000017500000000545114461637417017051 0ustar polveraripolverari/********************************************************************** * demo.c - Demo the drawing area widget * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #include #include #include #include #include "X11/Xaw_d/DrawingA.h" #include #include GC gc = 0; /*** Start of main program ***/ main(argc, argv) int argc; char **argv; { XtAppContext app_context; Widget toplevel; /* The core widget */ Arg wargs[20]; /* Used to set widget resources */ int n; toplevel = XtAppInitialize(&app_context,"Demo", NULL, 0, (Cardinal *)&argc, argv, NULL, /*args*/(ArgList)NULL, /*num_args*/(Cardinal)0); setup_widgets( toplevel); XtRealizeWidget(toplevel); XtAppMainLoop(app_context); } static void redisplay_cb(w, closure, call_data) Widget w; XtPointer closure; XawDrawingAreaCallbackStruct * call_data; { int x = 10; int y = 10; int width = 30; int height = 30; if (gc == 0) { gc = XCreateGC(XtDisplay(w), XtWindow(w), 0, 0); XSetForeground(XtDisplay(w), gc, BlackPixel(XtDisplay(w), DefaultScreen(XtDisplay(w)))); } XDrawArc(XtDisplay(w), XtWindow(w), gc, x, y, width, height, 0, 360*64); XFillArc(XtDisplay(w), XtWindow(w), gc, x, y, width, height, 0, 360*64); } static void quit_cb(w, closure, call_data) Widget w; XtPointer closure; XtPointer call_data; { exit(0); } setup_widgets( toplevel ) Widget toplevel; { Widget button; Widget form_widget = XtCreateManagedWidget("form", formWidgetClass, toplevel, NULL,0); Widget canvas = XtVaCreateManagedWidget("canvas", drawingAreaWidgetClass, form_widget, XtNwidth, 200, XtNheight, 200, NULL); XtAddCallback(canvas,XtNexposeCallback,redisplay_cb, NULL); button = XtVaCreateManagedWidget("Quit", commandWidgetClass, form_widget, XtNfromVert, canvas, NULL); XtAddCallback(button,XtNcallback,quit_cb, NULL); } xball-3.0.1+dfsg/X11/Xaw_d/DrawingAP.h0000644000175000017500000000252514461637417017745 0ustar polveraripolverari/* DrawingArea Private header file */ /* Copyright 1990, David Nedde /* /* Permission to use, copy, modify, and distribute this /* software and its documentation for any purpose and without fee /* is granted provided that the above copyright notice appears in all copies. /* It is provided "as is" without express or implied warranty. */ #ifndef _XawDrawingAreaP_h #define _XawDrawingAreaP_h #include "DrawingA.h" #ifdef X11_R3 #include #else #include #endif /* The drawing area's contribution to the class record */ typedef struct _DrawingAreaClassPart { int ignore; } DrawingAreaClassPart; /* Drawing area's full class record */ typedef struct _DrawingAreaClassRec { CoreClassPart core_class; SimpleClassPart simple_class; DrawingAreaClassPart drawing_area; } DrawingAreaClassRec; extern DrawingAreaClassRec drawingAreaClassRec; /* Resources added and status of drawing area widget */ typedef struct _XsDrawingAreaPart { /* Resources */ XtCallbackList expose_callback; XtCallbackList input_callback; XtCallbackList motion_callback; XtCallbackList resize_callback; } DrawingAreaPart; /* Drawing area's instance record */ typedef struct _DrawingAreaRec { CorePart core; SimplePart simple; DrawingAreaPart drawing_area; } DrawingAreaRec; #endif /* _XawDrawingAreaP_h */ xball-3.0.1+dfsg/X11/Xaw_d/Makefile.std0000644000175000017500000002457614461637417020223 0ustar polveraripolverari# Makefile generated by imake - do not edit! # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $ # # The cpp used on this machine replaces all newlines and multiple tabs and # spaces in a macro expansion with a single space. Imake tries to compensate # for this, but is not always successful. # ########################################################################### # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $ # # Platform-specific parameters may be set in the appropriate .cf # configuration files. Site-wide parameters may be set in the file # site.def. Full rebuilds are recommended if any parameters are changed. # # If your C preprocessor doesn't define any unique symbols, you'll need # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing # "make Makefile", "make Makefiles", or "make World"). # # If you absolutely can't get imake to work, you'll need to set the # variables at the top of each Makefile as well as the dependencies at the # bottom (makedepend will do this automatically). # ########################################################################### # platform-specific configuration parameters - edit sun.cf to change SYSLIBS=-lXt -lX11 MWM_DEFINES=-DSHAPE -DOPAQUE SYSLIBS=$(MTOOLKITSRC)/libXt.a $(XLIBSRC)/libX11.a # platform: $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $ # operating system: SunOS 4.1 ########################################################################### # site-specific configuration parameters - edit site.def to change # site: $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $ SHELL = /bin/sh TOP = . CURRENT_DIR = . AR = ar cq BOOTSTRAPCFLAGS = CC = cc COMPRESS = compress CPP = /lib/cpp $(STD_CPP_DEFINES) PREPROCESSCMD = cc -E $(STD_CPP_DEFINES) INSTALL = install LD = ld LINT = lint LINTLIBFLAG = -C LINTOPTS = -axz LN = ln -s MAKE = make MV = mv CP = cp RANLIB = ranlib RANLIBINSTFLAGS = RM = rm -f STD_INCLUDES = STD_CPP_DEFINES = STD_DEFINES = EXTRA_LOAD_FLAGS = EXTRA_LIBRARIES = TAGS = ctags SHAREDCODEDEF = -DSHAREDCODE SHLIBDEF = -DSUNSHLIB PROTO_DEFINES = INSTPGMFLAGS = INSTBINFLAGS = -m 0755 INSTUIDFLAGS = -m 4755 INSTLIBFLAGS = -m 0664 INSTINCFLAGS = -m 0444 INSTMANFLAGS = -m 0444 INSTDATFLAGS = -m 0444 INSTKMEMFLAGS = -m 4755 DESTDIR = TOP_INCLUDES = -I$(INCROOT) CDEBUGFLAGS = -O CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD COMPATFLAGS = ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) LDCOMBINEFLAGS = -X -r MACROFILE = sun.cf RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut IMAKE_DEFINES = IRULESRC = $(CONFIGDIR) IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) ########################################################################### # X Window System Build Parameters # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ ########################################################################### # X Window System make variables; this need to be coordinated with rules # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ PATHSEP = / USRLIBDIR = $(DESTDIR)/usr/lib BINDIR = $(DESTDIR)/usr/bin/X11 INCROOT = $(DESTDIR)/usr/include BUILDINCROOT = $(TOP) BUILDINCDIR = $(BUILDINCROOT)/X11 BUILDINCTOP = .. INCDIR = $(INCROOT)/X11 ADMDIR = $(DESTDIR)/usr/adm LIBDIR = $(USRLIBDIR)/X11 CONFIGDIR = $(LIBDIR)/config LINTLIBDIR = $(USRLIBDIR)/lint FONTDIR = $(LIBDIR)/fonts XINITDIR = $(LIBDIR)/xinit XDMDIR = $(LIBDIR)/xdm AWMDIR = $(LIBDIR)/awm TWMDIR = $(LIBDIR)/twm GWMDIR = $(LIBDIR)/gwm MANPATH = $(DESTDIR)/usr/man MANSOURCEPATH = $(MANPATH)/man MANDIR = $(MANSOURCEPATH)n LIBMANDIR = $(MANSOURCEPATH)3 XAPPLOADDIR = $(LIBDIR)/app-defaults SOXLIBREV = 4.2 SOXTREV = 4.0 SOXAWREV = 4.0 SOOLDXREV = 4.0 SOXMUREV = 4.0 SOXEXTREV = 4.0 FONTCFLAGS = -t INSTAPPFLAGS = $(INSTDATFLAGS) IMAKE = imake DEPEND = makedepend RGB = rgb FONTC = bdftosnf MKFONTDIR = mkfontdir MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh CONFIGSRC = $(TOP)/config CLIENTSRC = $(TOP)/clients DEMOSRC = $(TOP)/demos LIBSRC = $(TOP)/lib FONTSRC = $(TOP)/fonts INCLUDESRC = $(TOP)/X11 SERVERSRC = $(TOP)/server UTILSRC = $(TOP)/util SCRIPTSRC = $(UTILSRC)/scripts EXAMPLESRC = $(TOP)/examples CONTRIBSRC = $(TOP)/../contrib DOCSRC = $(TOP)/doc RGBSRC = $(TOP)/rgb DEPENDSRC = $(UTILSRC)/makedepend IMAKESRC = $(CONFIGSRC) XAUTHSRC = $(LIBSRC)/Xau XLIBSRC = $(LIBSRC)/X XMUSRC = $(LIBSRC)/Xmu TOOLKITSRC = $(LIBSRC)/Xt AWIDGETSRC = $(LIBSRC)/Xaw OLDXLIBSRC = $(LIBSRC)/oldX XDMCPLIBSRC = $(LIBSRC)/Xdmcp BDFTOSNFSRC = $(FONTSRC)/bdftosnf MKFONTDIRSRC = $(FONTSRC)/mkfontdir EXTENSIONSRC = $(TOP)/extensions DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a EXTENSIONLIB = -lXext DEPXLIB = $(DEPEXTENSIONLIB) XLIB = $(EXTENSIONLIB) -lX11 DEPXAUTHLIB = $(USRLIBDIR)/libXau.a XAUTHLIB = -lXau DEPXMULIB = XMULIB = -lXmu DEPOLDXLIB = OLDXLIB = -loldX DEPXTOOLLIB = XTOOLLIB = -lXt DEPXAWLIB = XAWLIB = -lXaw LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln LINTXLIB = $(USRLIBDIR)/llib-lX11.ln LINTXMU = $(USRLIBDIR)/llib-lXmu.ln LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln LINTXAW = $(USRLIBDIR)/llib-lXaw.ln DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) USRINCDIR = $(DESTDIR)/usr/include TESTSRC = $(TOP)/tests TESTSRCLIB = $(TESTSRC)/lib TESTSRCBIN = $(TESTSRC)/bin COMMONPP = $(TESTSRCBIN)/Commonpp TESTCOMSRC = $(TESTSRCLIB)/Common MTOOLKITSRC = $(LIBSRC)/Xt MWIDGETSRC = $(LIBSRC)/Xm MRESOURCESRC = $(LIBSRC)/Mrm UILSRC = $(CLIENTSRC)/uil UIL = $(UILSRC)/uil XMTOOLLIB = $(MTOOLKITSRC)/libXt.a XMLIB = $(MWIDGETSRC)/libXm.a MRESOURCELIB = $(MRESOURCESRC)/libMrm.a UILLIB = $(UILSRC)/libUil.a TESTCOMLIB = $(TESTCOMSRC)/libCommon.a LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln LINTUILLIB = $(UILSRC)/llib-lUil.ln DEPLIBS = DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) ########################################################################### # Imake rules for building libraries, programs, scripts, and data files # rules: $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $ ########################################################################### # start of Imakefile # # Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu) # INCLUDES = -I../.. DEMO_SRCS = demo.c DEMO_OBJS = demo.o LOCAL_LIBRARIES = -lXaw_d LDOPTIONS = -L. LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11 all:: libXaw_d.a libXaw_d.a: DrawingA.o $(RM) $@ $(AR) $@ DrawingA.o $(RANLIB) $@ SRCS = $(DEMO_SRCS) OBJS = $(DEMO_OBJS) PROGRAM = demo all:: demo demo: $(OBJS) $(DEPLIBS) $(RM) $@ $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) saber_demo: #load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) osaber_demo: #load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) install:: demo $(INSTALL) -c $(INSTPGMFLAGS) demo $(BINDIR) install.man:: demo.man $(INSTALL) -c $(INSTMANFLAGS) demo.man $(MANDIR)/demo.n depend:: $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS) lint: $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) lint1: $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) clean:: $(RM) $(PROGRAM) DIST = \ X11 \ X11/Xaw_d \ X11/Xaw_d/DrawingA.c \ X11/Xaw_d/DrawingA.h \ X11/Xaw_d/DrawingAP.h \ X11/Xaw_d/DrawingA.doc \ X11/Xaw_d/Imakefile \ X11/Xaw_d/Makefile.std \ X11/Xaw_d/patchlevel.h \ X11/Xaw_d/demo.c \ X11/Xaw_d/README shar: ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d ) tar: ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z ) ########################################################################### # common rules for all Makefiles - do not edit emptyrule:: clean:: $(RM_CMD) \#* Makefile:: -@if [ -f Makefile ]; then \ echo " $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ else exit 0; fi $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) tags:: $(TAGS) -w *.[ch] $(TAGS) -xw *.[ch] > TAGS saber: #load $(ALLDEFINES) $(SRCS) osaber: #load $(ALLDEFINES) $(OBJS) ########################################################################### # empty rules for directories that do not have SUBDIRS - do not edit install:: @echo "install in $(CURRENT_DIR) done" install.man:: @echo "install.man in $(CURRENT_DIR) done" Makefiles:: includes:: ########################################################################### # dependencies generated by makedepend xball-3.0.1+dfsg/X11/Xaw_d/DrawingA.doc0000644000175000017500000001013614461637417020140 0ustar polveraripolverariDrawingArea Widget SYNOPSIS Application header file Class header file Class drawingAreaWidgetClass Class Name DrawingArea Superclass Simple OVERVIEW This widget was needed to allow a drawing area in the Athena widget set that doesn't require hacking up the Label widget by adding complicated actions. This widget follows Motif's DrawingArea widget closely, except that it follows Athena's naming conventions and there is no resize policy. Also, Motif's Drawing area is a composite widget, while this one is a simple widget. This widget is NOT officially part of the Athena widget set. DESCRIPTION The DrawingArea widget is modeled after Motif's DrawingArea widget. The DrawingArea widget is an empty widget that is easily adaptable to a variety of purposes. It does no drawing and defines no behavior except for invoking callbacks. Callbacks notify the application when graphics need to be drawn (exposure events or widget resize) and when the widget receives input from the keyboard or mouse. Applications are responsible for defining appearence and behavior as needed in response to DrawingArea callbacks. Classes DrawingArea inherits behavior and resources from the Core and Simple classes. The class pointer is DrawingAreaWidgetClass. The class name is DrawingArea. New Resources Name Class RepType Default Value ---- ----- ------- ------------- exposeCallback Callback Pointer NULL inputCallback Callback Pointer NULL motionCallback Callback Pointer NULL resizeCallback Callback Pointer NULL XtNexposeCallback Specifies list of callbacks that is called when DrawingArea recieves an exposure event. The callback reason is XawCR_EXPOSE. XtNinputCallback Specifies list of callbacks that is called when DrawingArea recieves an keyboard or mouse event (key or button, up or down). The callback reason is XawCR_INPUT. XtNmotionCallback Specifies list of callbacks that is called when DrawingArea recieves a mouse motion event. The callback reason is XawCR_MOTION. XtNresizeCallback Specifies list of callbacks that is called when the DrawingArea is resized. The callback reason is XawCR_RESIZE. Inherited Resources, Changed defaults Name Class RepType Default Value ---- ----- ------- ------------- height Height Dimension 100 width Width Dimension 100 Callback Information A pointer to the following structure is returned with each callback. typedef struct { int reason; XEvent *event; Window window; } XawDrawingAreaCallbackStruct; reason: Indicates why the callback was invoked event: Points to the XEvent that triggered the callback window: Is set to the widget window Behavior ,,,: The callbacks for XtNinputCallback are called when a key or button is pressed or released. : The callbacks for XtNexposeCallbacks are called when the widget recieves an exposure event. : The callbacks for XtNresizeCallbacks are called when the widget is resized. : The callbacks for XtNmotionCallbacks are called when the widget recieves a pointer motion event. Default Translations : input() : input() : input() : input() : motion() : resize() SEE ALSO OSF/Motif Programmer's reference: XmDrawingArea Open Software Foundation Athena Widget Set - C Language Interface Rel 4: 3.6 Simple Widget Chris D. Peterson X Toolkit Intrinsics - C Language Interface Joel McCormack, Paul Asenta, Ralph R. Swick The X Window System, programming and Applications with Xt, OSF/Motif Edition Douglas A. Young COPYRIGHT Copyright 1990, David Nedde Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is provided that the above copyright notice appears in all copies. It is provided "as is" without express or implied warranty. AUTHOR David Nedde, daven@maxine.wpi.edu xball-3.0.1+dfsg/X11/Xaw_d/Imakefile0000644000175000017500000000147414461637417017573 0ustar polveraripolverari/**/# /**/# Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu) /**/# INCLUDES = -I../.. DEMO_SRCS = demo.c DEMO_OBJS = demo.o LOCAL_LIBRARIES = -lXaw_d LDOPTIONS = -L. LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11 NormalLibraryTarget(Xaw_d,DrawingA.o) SRCS = $(DEMO_SRCS) OBJS = $(DEMO_OBJS) ComplexProgramTarget(demo) DIST = \ X11 \ X11/Xaw_d \ X11/Xaw_d/DrawingA.c \ X11/Xaw_d/DrawingA.h \ X11/Xaw_d/DrawingAP.h \ X11/Xaw_d/DrawingA.doc \ X11/Xaw_d/Imakefile \ X11/Xaw_d/Makefile.std \ X11/Xaw_d/patchlevel.h \ X11/Xaw_d/demo.c \ X11/Xaw_d/README shar: ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d ) tar: ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z ) xball-3.0.1+dfsg/X11/Xaw_d/...config.is.done0000644000175000017500000000000014461637417020702 0ustar polveraripolverarixball-3.0.1+dfsg/X11/Xaw_d/demo0000755000175000017500000004751214461637417016637 0ustar polveraripolverari d è¸-»Í€£\ `‹D$£4 `·èPèƒÄè<è+Pè‘`[¸Í€ë÷DemoU‰åì¤S‹] èFjjjSURjjhT…\ÿÿÿPè’*`‰ÃƒÄ$SèSè±*`‹•\ÿÿÿRèÕ*`‹Xÿÿÿ‰ì]ÃU‰åWVS‹uƒ=u@jj‹~`W‹FX‹@Pèö `£‹VX‹J‹‘„‹™Œ’Áâ‹T8RPQèu `ƒÄhZjjjj j ‹=W‹~`W‹FX‹@Pè `ƒÄ$hZjjjj j ‹=W‹~`W‹FX‹@Pès `eô[^_‰ì]ÃU‰åjèR`formcanvasexposeCallbackfromVertQuitU‰åVSjj‹UR‹ük0`Rh„è¶*`‰ÆjhÈhÒ]*`hÈhP`*`V‹ˆRh‰èd *`‰ÃƒÄ4jhÄhSè]þ)`jShŸV‹ti0`Rh¨è3 *`ƒÄ(jhthp]*`Pè.þ)`eø[^‰ì]ÃresizemotioninputresizeCallbackmotionCallbackinputCallbackexposeCallbackDrawingAreaU‰å‹E‹U fƒx ufÇB dfƒx"ufÇB"d‰ì]ÃU‰åS‹]hŒSè²ý)`h~Sè§ý)`hoSèœý)`h`Sè‘ý)`‹]ü‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPhŒRèqý)`‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh`RèAý)`‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPh~Rèý)`‰ì]ÃU‰åƒì ‹UÇEô‹M ‰Mø‹J`‰MüEôPhoRèáü)`‰ì]ÃlibXaw.so.6DLL Jump 6.0libXt.so.6DLL Jump 6.0libX11.so.6DLL Jump 6.0U‰åS¡ ƒøÿu1Àƒ=¤t@ƒ<…¤uõ‰Ã…Ût‹ ÿÐKuô‹]ü‰ì]ÃU‰åS»ƒ=t‹ƒÃÿЃ;uôh,èòüÿ_‹]ü‰ì]ÃU‰åƒ=ÌuÇÌè¥ÿÿÿ‰ì]Ãlibc.so.4DLL Jump 4.5pl26S¸‹\$Í€…À}÷Ø£ð¸ÿÿÿÿ[Ã[ÃS¸V‹\$Í€…À}÷Ø£ð¸ÿÿÿÿ[Ã[ÃS¸‹\$‹L$ ‹T$Í€…À}÷Ø£ð¸ÿÿÿÿ[Ã[ÃS¸[‹\$‹L$ Í€…À}÷Ø£ð¸ÿÿÿÿ[Ã[Ã/lib/ld.so: can't load dynamic linker '/lib/ld.so' statically linked ƒì8UWVS‹l$L‹\$Pƒ=„´ÇD$D ðbhÊèâþÿÿƒÄ…Àt[‹|$¾Õü¹ ó¥f¥…Àt€8t@€8uú+P‹SjèÙþÿÿƒÄ j*D$PjèÈþÿÿƒÄ h€èZþÿÿƒÄëñh,hø‹T$\R‹SD$ P¸…í¸P‹D$\ÿЋT$,R‹T$,RèµþÿÿƒÄ ë&|$¾ÿü¹ó¥…í+jD$PjèMþÿÿƒÄ …íjèÝýÿÿƒÄëô[^_]ƒÄ8Ãìf‹T$f…ÒuºrÙ|$f‹D$f%Àðf‰D$‰Ðf%?f‹T$f Ðf‰D$Ùl$ƒÄÃUWVS‹l$‹|$1Û9¨v ¾¬WU‹T$R‹ÿÐƒÄ ƒÆC9¨wæ[^_]ÃÓëþ: input() : input() : input() : input() : motion() : resize()Z|S¬LLŒ `*` c*`Œ c*`~ `*` c*` c*`o `*` c*`” c*`` `*` c*`˜ c*`hu0`›œ¬ð*`„œÜð*`þ*ð*`ð*`ð*` Üè0`@0`ø*`@*` `@ `ÐÜæ`ð`üŒ ´Ôø?0`ø?*`ø? `ø?`|œ°ÄäT__getutid__PLT__getutline__PLT__getw__PLT__gA0`”@*`A0`˜@*`@!P3FTMT\TnÄ|t…LLŸL±Æ„Ó|߬ìLùœ¬Ü$Ü/Ü:ÜEÜPœgr@}Š0`‘ø›°±¼@Ç”w*`Ûæñü(3ÄJU@` !`t,,Š,•, ,©,¸,Êd,éd,õ€€)€P€i€‡€Ë€€-€O€l€ˆ€š€­€Æ€ó€€*€L€X€€¢€È€÷€€I€q€˜€Â€ì€€2€W€m€¥€×€ÿ€W €‚€µ!€3-€47€5B€6L€7W€8b€9m€;x€E…€®€lÒ€.ç$,ý ¢ $§|* Ì9 $¸¼D ÜL Ü[ Üm dÜŒ dܘ €º €Ì €ó € €* €n €² €Ð €ò € €+ €= €P €i €– €± €Í €ï €û €$ €E €k €š €» €ì € €; €e € €² €Õ €ú €€H€z€¢€W¯€‚¹€µÄ€3Ѐ4Ú€5å€6ï€7ú€8€9€;€E(€Q€lu€.Š øžÜ§ä¼Ç@ÒLA `æøñøüøøø"ø+08pCèRX*`h€ *`zð*`†Ø `°*`ª¨*`ÃˆÛøñth0`Ðp*`-hv0`@ük0`Qti0`e0q¨*`P*`Œ,°  ¿ *`É Ñà ÷ *` ˜*`!  *`6˜ *`L8*`_h*`p*`‚P*`“*`¦|¹È*`ͨ`Û` *`ôˆ*` x *`ø*`* *`=X `G`h*`t(*`…`*`•p*`¤¬d `º¨*`Òà*`ÚØ*`ä´óŒ *`#˜*`: *`Px*`cÐ*`ƒ°*`—*`¡8*`·0*`Ð(*`é*`ÿp*` $ *`7ˆ *`K*`_*`uø*`Š€*`• *`«*`¾ Ëx*`Û¸*`ì0*`ú@*` p*`°*`#ÀS*`6ð*`B°*`X¨*`rØ`yè*`…´“80`¤\ `± °·À*`Ô,ëX *`ýÈ*` *`,`*`;pH€*`Xx*`iÀ*`wȈˆ `˜ `©ˆ*`»€*`΀*`Ú@*`èÔöÐ*`  ¨¸*`1@*`C*`]ˆ*`wh*`‡*`™˜*`«ð `»ˆ*`ʼj0`ؘ*`ïÀ*`ÿ*`è\*`$È*`3hu0`C˜`Kø `UH*`f*`{è `Œ`*`ŸX*`°à `»ÔÑh *`å¨*`÷ *` x*`¸*`%p *`;˜*`O*`dH*`z´’ø*`¥Ð`«d±ˆ*`Ã4 `ΰ*`á è*`û °¼èl*`X*`*/usr/lib/crt0.o__entrydone___shared_dummy_____shared_dummy1__demo.ogcc2_compiled.___gnu_compiled_c_redisplay_cb_quit_cbDrawingA.ogcc2_compiled.___gnu_compiled_c_defaultTranslations_actionsList_input_draw_motion_draw_resize_draw_resources_Initialize_Destroy_Redisplay__T00007.o__D00011.o__D00036.o__libXaw.o__libXaw_CONFLICT_LIST__GOT_SIZE__PLT_SIZE__LAST_DATA_ADDRESS__libXt.o__libXt_CONFLICT_LIST__GOT_SIZE__PLT_SIZE__LAST_DATA_ADDRESS__T00012.o__T00078.o__T00129.o__T00190.o__T00200.o__T00363.o__D00033.o__libX11.o__libX11_CONFLICT_LIST__GOT_SIZE__PLT_SIZE__LAST_DATA_ADDRESS__T00060.o__T00075.o__T00091.o__T00337.o__main.ogcc2_compiled.___gnu_compiled_c/home/jalod/gnu/src/gcc-2.5.8/./libgcc2.cint:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;long long int:t6=r1;01000000000000000000000;0777777777777777777777;long long unsigned int:t7=r1;0000000000000;01777777777777777777777;short int:t8=r1;-32768;32767;short unsigned int:t9=r1;0;65535;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;12;0;complex int:t15=s8real:1,0,32;imag:1,32,32;;complex float:t16=r16;4;0;complex double:t17=r17;8;0;complex long double:t18=r18;12;0;void:t19=19reg_class:T20=eNO_REGS:0,AREG:1,DREG:2,\CREG:3,BREG:4,Q_REGS:5,SIREG:6,\DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,\ALL_REGS:13,LIM_REG_CLASSES:14,;machine_mode:T21=eVOIDmode:0,QImode:1,HImode:2,\PSImode:3,SImode:4,PDImode:5,DImode:6,\TImode:7,OImode:8,QFmode:9,HFmode:10,\SFmode:11,DFmode:12,XFmode:13,TFmode:14,\SCmode:15,DCmode:16,XCmode:17,TCmode:18,\CQImode:19,CHImode:20,CSImode:21,\CDImode:22,CTImode:23,COImode:24,\BLKmode:25,CCmode:26,CCFPEQmode:27,\MAX_MACHINE_MODE:28,;mode_class:T22=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,\MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,\MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,;ptrdiff_t:t1size_t:t4wchar_t:t3UQItype:t11SItype:t1USItype:t4DItype:t6UDItype:t7SFtype:t12DFtype:t13XFtype:t14word_type:t1DIstruct:T23=s8low:1,0,32;high:1,32,32;;DIunion:t24=u8s:23,0,64;ll:6,0,64;;func_ptr:t25=*26=f19__do_global_dtors:F19_exit_dummy_ref:G27=*1__do_global_ctors:F19_initialized.6__main:F19_exit.ogcc2_compiled.___gnu_compiled_c/home/jalod/gnu/src/gcc-2.5.8/./libgcc2.cint:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;long long int:t6=r1;01000000000000000000000;0777777777777777777777;long long unsigned int:t7=r1;0000000000000;01777777777777777777777;short int:t8=r1;-32768;32767;short unsigned int:t9=r1;0;65535;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;12;0;complex int:t15=s8real:1,0,32;imag:1,32,32;;complex float:t16=r16;4;0;complex double:t17=r17;8;0;complex long double:t18=r18;12;0;void:t19=19reg_class:T20=eNO_REGS:0,AREG:1,DREG:2,\CREG:3,BREG:4,Q_REGS:5,SIREG:6,\DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,\ALL_REGS:13,LIM_REG_CLASSES:14,;machine_mode:T21=eVOIDmode:0,QImode:1,HImode:2,\PSImode:3,SImode:4,PDImode:5,DImode:6,\TImode:7,OImode:8,QFmode:9,HFmode:10,\SFmode:11,DFmode:12,XFmode:13,TFmode:14,\SCmode:15,DCmode:16,XCmode:17,TCmode:18,\CQImode:19,CHImode:20,CSImode:21,\CDImode:22,CTImode:23,COImode:24,\BLKmode:25,CCmode:26,CCFPEQmode:27,\MAX_MACHINE_MODE:28,;mode_class:T22=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,\MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,\MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,;ptrdiff_t:t1size_t:t4wchar_t:t3UQItype:t11SItype:t1USItype:t4DItype:t6UDItype:t7SFtype:t12DFtype:t13XFtype:t14word_type:t1DIstruct:T23=s8low:1,0,32;high:1,32,32;;DIunion:t24=u8s:23,0,64;ll:6,0,64;;func_ptr:t25=*26=f19_exit_dummy_decl:G1__libc.o__libc_CONFLICT_LIST__GOT_SIZE__PLT_SIZE__LAST_DATA_ADDRESS__T00051.o__T00059.o__T00122.o__D00126.o__fpu_control.o__load.o__setfpucw.oset-init.o___fpu_control__XtConvertTypeToMask_XtVaSetSubvalues__XtInherit_XFillArc_XtCreateApplicationShell_XtDispatchEventToWidget_drawingAreaWidgetClass___SHARED_LIBRARIES___commandClassRec__exit_dummy_decl_XtInitializeWidgetClass_simpleWidgetClass_formWidgetClass_commandWidgetClass___setfpucw_XtSuperclass__XtFreeWWTable___libXaw_6_0___do_global_dtors___DTOR_LIST___XtWindow__edata___CTOR_LIST____NEEDS_SHRLIB_libXt_6_XtUnregisterDrawable_XtRegisterDrawable_XtVaOpenApplication__XtVaOpenApplication_XtOpenApplication_XtDispatchEvent_XtScreenDatabase__XtIsSubclassOf_XtSetLanguageProc___do_global_ctors_XtCallCallbackList___new_exitfn_XtVaCreateManagedWidget_XtCreateManagedWidget_XtVaSetValues__XtGetUserName__XtFreeEventTable_XDrawArc___load_shared_libraries__XtAddCallbackOnce_XtAppInitialize__XtAddCallback_XtAddCallback__etext___exit_funcs__XtCompileCallbackList_XtName_XtParent_setup_widgets__NEEDS_SHRLIB_libXaw_6__XtPreparseCommandLine__XtRemoveAllCallbacks_XtRemoveAllCallbacks_XtDisplayOfObject__XtCallConditionalCallbackList__XtGetCallbackList_XtScreen_XtAddRawEventHandler_XtInsertRawEventHandler_XtRemoveRawEventHandler_XtRemoveEventHandler_XtNameToWidget_drawingAreaClassRec_XtVaAppInitialize__XtVaAppInitialize__XtEventInitialize__XtDisplayInitialize_XtToolkitInitialize_XtDisplay_XtInsertEventHandler_XtAddEventHandler___libXt_6_0_XtAddCallbacks_XtCallCallbacks_XtInitialize__XtPeekCallback_gc_XtAddGrab_XtClass_XtCXtToolkitError_XtFindFile_XtLastEventProcessed_XtLastTimestampProcessed___brk_XtIsObject___libX11_6_0_XawFormDoLayout____brk_addr__end_XtRegisterExtensionSelector__SHARABLE_CONFLICTS___XtVaCreateWidget__XtExtensionSelect_XtAppSetFallbackResources__XtOnGrabList___libc_init_XtCreateWidget__XtCreateWidget_XtIsRealized__exit_dummy_ref_XSetForeground_XGContextFromGC_XtRemoveCallback__XtRemoveCallback_XtMainLoop_XtIsSubclass___libc_4_526__XtWindowedAncestor___libc_subinit_XtSetEventDispatcher_XtWindowToWidget_XtInsertEventTypeHandler_XtRemoveEventTypeHandler_XtCreateWindow_XtBuildEventMask_XtWindowOfObject__XFlushGCCache_XtAppMainLoop_formClassRec_XtAddExposureToRegion_XtHasCallbacks_XtCallAcceptFocus_etext_XtStrings_XtIsSensitive_simpleClassRec_atexit_XFlushGC__XtAllocWWTable_XtGetClassExtension__XUpdateGCCache_XtUnrealizeWidget_XtRealizeWidget_XCreateGC__NEEDS_SHRLIB_libc_4_XtVaAppCreateShell_XtAppCreateShell__XtAppCreateShell_XtRemoveGrab_XtIsManaged_XtVaCreatePopupShell_XtCreatePopupShell__XtCreatePopupShell__XtCheckSubclassFlag__NEEDS_SHRLIB_libX11_6_XtResolvePathname_exit_main_XtScreenOfObject___environ__XtSendFocusEvent_edata_XtRemoveCallbacks_end___main_XtShellStrings__XtCreateHookObjxball-3.0.1+dfsg/misc.c0000644000175000017500000000310514461637417015437 0ustar polveraripolverari/********************************************************************** * misc.c - Misc functions * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include /* Given a string 'text\nmore text', allocates and returns the string before the newline. */ char *get_string( str) char *str; { char *tmp; char *newline = strchr(str,'\n'); int len; if (newline == (char *)0) return (char *)0; len = newline - str; tmp = malloc( len + 1); strncpy( tmp, str, len + 1); tmp[ len] = '\0'; return tmp; } /* Because some systems do not have strdup */ char *my_strdup( str) char *str; { char *ret_str = malloc( strlen( str) + 1); strcpy( ret_str, str); return ret_str; } /* Return a random value in the specified range */ long rand_range( min, max) long min, max; { if (min == max) return min; else return random() % (max - min) + min; } /* Change '~' to \n in the passed string */ /* This silliness is due to fallback resources not handling \n in the resource string */ void convert_newlines( str) char *str; { char *curr = strchr( str, '~'); while (curr != 0) { *curr = '\n'; curr = strchr( curr, '~'); } } xball-3.0.1+dfsg/help.c0000644000175000017500000002334314461637417015442 0ustar polveraripolverari/********************************************************************** * help.c - help object definition * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #ifdef MOTIF #include #include #include #include #include typedef struct { char *label; /* Button widget's name */ void (*callback)(); /* Button widget's callback */ caddr_t data; /* Callback data */ } HelpButtonItem; #endif #ifdef ATHENA #include #include #include #include #include #endif /* Local headers */ #include "help.h" #include "names.h" #include "misc.h" #include "miscx.h" /* File scope variables */ typedef struct { char *menu_help; char *scrollbar_help; char *pointer_help; char *demo_help; char *startup_help; char *about_help; } app_data,*app_data_ptr; static app_data res_data = { 0, 0, 0, 0, 0, 0 }; static XtResource resources[] = { { "menuHelp", "MenuHelp", XtRString, sizeof(char *), XtOffset( app_data_ptr, menu_help), XtRString, NULL}, { "scrollbarHelp", "ScrollbarHelp", XtRString, sizeof(char *), XtOffset( app_data_ptr, scrollbar_help), XtRString, NULL}, { "pointerHelp", "PointerHelp", XtRString, sizeof(char *), XtOffset( app_data_ptr, pointer_help), XtRString, NULL}, { "demoHelp", "DemoHelp", XtRString, sizeof(char *), XtOffset( app_data_ptr, demo_help), XtRString, NULL}, { "startupHelp", "StartupHelp", XtRString, sizeof(char *), XtOffset( app_data_ptr, startup_help), XtRString, NULL}, { "aboutString", "AboutString", XtRString, sizeof(char *), XtOffset( app_data_ptr, about_help), XtRString, NULL} }; /* Functions */ static void close_cb(/*w, help, call_data*/); static void display_help_dialog(/*help, message*/); static void create_help_dialog(/* help*/); static void set_help_text(/* help, message*/); /* Public object methods */ /* Create the help object */ help_type help__create(w) Widget w; { help_type help = XtNew( help_struct_type); help->toplevel = w; help->dialog_w = (Widget)0; return help; } /* Destroy the help object */ void help__destroy(help) help_type help; { XtDestroyWidget( help->dialog_w); XtFree( (char *)help); } /* A menu callback (mcb) that displayshelp to the user, based on the name of the menu button used to invoke the callback */ void help__display_mcb(w, help, call_data, extra) Widget w; help_type help; XtPointer call_data; char * extra; { char * help_text; char * widget_name = XtName(w); if (res_data.menu_help == 0) { /* Read help text resources */ XtGetApplicationResources(get_toplevel(w), (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); /* We have to convert the ~ to newlines because fallback resources do not work if they have newlines embedded in them */ /* convert_newlines is in misc.c */ convert_newlines( res_data.menu_help); convert_newlines( res_data.scrollbar_help); convert_newlines( res_data.pointer_help); convert_newlines( res_data.demo_help); convert_newlines( res_data.startup_help); convert_newlines( res_data.about_help); } if (strcmp( widget_name, ON_MENUS) == 0) help_text = res_data.menu_help; else if (strcmp( widget_name, ON_SCROLL) == 0) help_text = res_data.scrollbar_help; else if (strcmp( widget_name, ON_BUTTONS) == 0) help_text = res_data.pointer_help; else if (strcmp( widget_name, ON_DEMOS) == 0) help_text = res_data.demo_help; else if (strcmp( widget_name, ON_PARAMS) == 0) help_text = res_data.startup_help; else if (strcmp( widget_name, ABOUT) == 0) help_text = res_data.about_help; /* Display the help dialog */ display_help_dialog(help, help_text); } /* Private object methods */ /* Called when the user wants to close the help dialog */ static void close_cb(w, help, call_data) Widget w; help_type help; XtPointer call_data; { XtUnmanageChild( help->dialog_w); } /* Displays the passed message in the help dialog */ static void display_help_dialog(help, message) help_type help; char *message; { if (help->dialog_w == (Widget)0) { create_help_dialog( help); } set_help_text( help, message); XtManageChild( help->dialog_w); } #ifdef MOTIF static Widget create_help_button(parent, action) Widget parent; HelpButtonItem *action; { char txt[100]; Widget button, widget; sprintf(txt,"%s_action_area", XtName(parent)); button = XtVaCreateWidget(txt, xmFormWidgetClass, parent, XmNfractionBase, 0, XmNmarginHeight, 10, XmNmarginWidth, 10, NULL); widget = XtVaCreateManagedWidget(action->label, xmPushButtonWidgetClass, button, XmNleftAttachment, XmATTACH_FORM, XmNleftPosition, 0, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNrightPosition, 19, XmNshowAsDefault, 1, XmNdefaultButtonShadowThickness, 1, NULL); if (action->callback) XtAddCallback(widget, XmNactivateCallback, action->callback, (XtPointer)action->data); // Default button should be first widget XtVaSetValues(parent, XmNdefaultButton, widget, NULL); XtManageChild(button); return button; } /* Motif help dialog */ static void create_help_dialog(help) help_type help; { Widget sep; Arg wargs[10]; int n; static HelpButtonItem action_item = { "close", close_cb, NULL }; help->dialog_w = XmCreateFormDialog( help->toplevel, HELP_DIALOG, NULL, 0); /* Create the action area */ action_item.data = (XtPointer )help; create_help_button( help->dialog_w, &action_item); sep = XtVaCreateManagedWidget("separator", xmSeparatorWidgetClass, help->dialog_w, NULL); n = 0; XtSetArg(wargs[n], XmNeditMode, XmMULTI_LINE_EDIT); n++; XtSetArg(wargs[n], XmNeditable, False); n++; XtSetArg(wargs[n], XmNverifyBell, False); n++; XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_WIDGET); n++; XtSetArg(wargs[n], XmNbottomWidget, sep); n++; help->text_w = XmCreateScrolledText( help->dialog_w, "help_text", wargs, n); XtManageChild( help->text_w); } /* Sets the help text in the Motif dialog */ static void set_help_text( help, message) help_type help; char * message; { XmTextSetString( help->text_w, message); } #endif #ifdef ATHENA /* Creates the Athena help dialog */ static void create_help_dialog( help) help_type help; { Widget form; Widget button; char buff[50]; Dimension border_width; Dimension top_width; Dimension top_height; Dimension dialog_width; Dimension dialog_height; int x_offset, y_offset; Position x,y; sprintf(buff, "%s_popup", HELP_DIALOG); help->dialog_w = XtVaCreateWidget( buff, transientShellWidgetClass, help->toplevel, XtNtransientFor, help->toplevel, XtNmappedWhenManaged, False, NULL); form = XtVaCreateManagedWidget( HELP_DIALOG, formWidgetClass, help->dialog_w, NULL); help->text_w = XtVaCreateManagedWidget( "help_textAW", asciiTextWidgetClass, form, NULL); button = XtVaCreateManagedWidget( "close", commandWidgetClass, form, XtNfromVert, help->text_w, NULL); XtAddCallback( button, XtNcallback, close_cb, (XtPointer)help); XtInstallAccelerators( form, button); /* Manage so the shell widget's width and height will be set */ XtManageChild( help->dialog_w); /* Position centered over the toplevel window */ XtVaGetValues( help->toplevel, XtNwidth, &top_width, XtNheight, &top_height, XtNborderWidth, &border_width, NULL); XtVaGetValues( help->dialog_w, XtNwidth, &dialog_width, XtNheight, &dialog_height, NULL); x_offset = (top_width - dialog_width ) / 2; y_offset = (top_height - dialog_height) / 2; XtTranslateCoords(help->toplevel, x_offset, y_offset, &x, &y); XtUnmanageChild( help->dialog_w); XtVaSetValues( help->dialog_w, XtNx, x, XtNy, y, XtNmappedWhenManaged, True, NULL); } /* Set the help string in the Athena help dialog */ static void set_help_text( help, message) help_type help; char * message; { XtVaSetValues( help->text_w, XtNstring, message, NULL); } #endif xball-3.0.1+dfsg/patchlevel.h0000644000175000017500000000002514461637417016636 0ustar polveraripolverari#define PATCHLEVEL 0 xball-3.0.1+dfsg/demo90000644000175000017500000000241014461637417015276 0ustar polveraripolveraricollide off gravity 10 elasticity 90 window_width 400 create 10,20,0,0 iterate 3 create 20,20,0,0 iterate 3 create 30,20,0,0 iterate 3 create 40,20,0,0 iterate 3 create 50,20,0,0 iterate 3 create 60,20,0,0 iterate 3 create 70,20,0,0 iterate 3 create 80,20,0,0 iterate 3 create 90,20,0,0 iterate 3 create 100,20,0,0 iterate 3 create 110,20,0,0 iterate 3 create 120,20,0,0 iterate 3 create 130,20,0,0 iterate 3 create 140,20,0,0 iterate 3 create 150,20,0,0 iterate 3 create 160,20,0,0 iterate 3 create 170,20,0,0 iterate 3 create 180,20,0,0 iterate 3 create 190,20,0,0 iterate 3 create 200,20,0,0 iterate 3 create 210,20,0,0 iterate 3 create 220,20,0,0 iterate 3 create 230,20,0,0 iterate 3 create 240,20,0,0 iterate 3 create 250,20,0,0 iterate 3 create 260,20,0,0 iterate 3 create 270,20,0,0 iterate 3 create 280,20,0,0 iterate 3 create 290,20,0,0 iterate 3 create 300,20,0,0 iterate 3 create 310,20,0,0 iterate 3 create 320,20,0,0 iterate 3 create 330,20,0,0 iterate 3 create 340,20,0,0 iterate 3 create 350,20,0,0 iterate 3 create 360,20,0,0 iterate 3 create 370,20,0,0 iterate 3 create 380,20,0,0 iterate 3 create 390,20,0,0 iterate 60 create 0,310,3,0 perpetual off iterate 40 iterate 300 perpetual on iterate 300 perpetual off collide on create 5,20,0,0 iterate 200 exit xball-3.0.1+dfsg/xball-a.xbm0000644000175000017500000000017614461637417016375 0ustar polveraripolverari#define xball_a_width 5 #define xball_a_height 7 static char xball_a_bits[] = { 0x00, 0x00, 0x0e, 0x10, 0x1e, 0x11, 0x1e}; xball-3.0.1+dfsg/list.h0000644000175000017500000000264614461637417015475 0ustar polveraripolverari/********************************************************************** * list.h - declares the list object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __LIST_H__ #define __LIST_H__ typedef struct { void **data; int count; int max_count; int curr_item; } list_struct, *list_type; #define LIST_INITIAL_SIZE 100 list_type list__create(); void list__destroy(/* list */); void * list__add_start(/* list, data_item */); void * list__add_end(/* list, data_item */); void * list__get_first(/* list */); void * list__get_next(/* list */); void * list__get_last(/* list */); void * list__get_prev(/* list */); void * list__remove_last(/* list */); void * list__remove_first(/* list */); void list__remove_all(/* list */); void * list__remove(/* list, index */); /* Inline functions */ #define list__get_cell(list, index) ((list)->data[ index]) #define list__set_cell(list, index) ((list)->data[ index]) #define list__get_count(list) ((list)->count) #endif xball-3.0.1+dfsg/install-sh0000644000175000017500000001572214461637417016351 0ustar polveraripolverari#!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } xball-3.0.1+dfsg/color_l.h0000644000175000017500000000250314461637417016143 0ustar polveraripolverari/********************************************************************** * color_l.h - Color list object declaration * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __COLOR_L_H__ #define __COLOR_L_H__ #include "list.h" #define SHADES 4 /* Number of shades for colors in the rgb.txt file */ typedef struct { list_type shaded_4_list; } color_list_struct, *color_list_type; typedef struct { int r,g,b; char * name; int last_char; } color_struct, *color_type; color_list_type color_list__create(/*filename*/); void color_list__destroy(/*color_list*/); color_type color_list__remove(/* color_list, index*/); int color_list__get_count(/* color_list*/); color_type color_list__get_last(/* color_list*/); color_type color_list__get_prev(/* color_list*/); char * color__get_shade(/* color, shade_num*/); /* Inline functions */ #define color_list__get_cell(list, index) \ ((color_type)list__get_cell((list)->shaded_4_list, index)) #endif xball-3.0.1+dfsg/demo40000644000175000017500000000042514461637417015275 0ustar polveraripolverari# have random balls form xball visible off collide off elasticity 100 gravity 0 load_bitmap xball.xbm 0,0 randomize -10,10,-10,10 backwards 100 visible on iterate 99 set_velocity abs 0,0 gravity 0 sleep 1 randomize -10,10,-13,7 gravity 10 elasticity 85 iterate 300 exit xball-3.0.1+dfsg/depcomp0000644000175000017500000003305214461637417015716 0ustar polveraripolverari#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 2003 Free Software Foundation, Inc. # 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; either version 2, or (at your option) # any later version. # 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. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 xball-3.0.1+dfsg/items.h0000644000175000017500000000240314461637417015632 0ustar polveraripolverari/********************************************************************** * file - description * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __ITEMS_H__ #define __ITEMS_H__ #include "list.h" #include "item.h" typedef struct { list_type list; int current; /* Used to increase efficiency */ } items_struct_type, *items_type; items_type items__create(/**/); items_type items__destroy(/*items*/); item_type items__get_first(/* items */); item_type items__get_next(/* items */); void items__add(/* items, item */); void items__destroy_all(/* items*/); void items__new_item(/* items, x, y, x_vel, y_vel */); void items__move_items(/* items, room*/); void items__move_items_backwards(/* items, room, count*/); void items__rebound_items(/* items, item*/); void items__set_visible( /*items, visible*/); /* Inline functions */ #define items__get_count( items) (list__get_count((items)->list)) #endif xball-3.0.1+dfsg/scrollbar.c0000644000175000017500000002450314461637417016474 0ustar polveraripolverari/********************************************************************** * scrollbar.c * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #ifdef MOTIF #include #include #include #endif #ifdef ATHENA #include #include #include #include #include #include #endif /* Local headers */ #include "scrollbar.h" #include "misc.h" /* Structures */ /* A node in the scrollbar callbacks list */ typedef struct { scrollbarCallbackProc proc; caddr_t closure; } callback_node; /* Functions */ void create_widgets(/* scrollbar, parent, name*/); static void call_callbacks(/* scrollbar, value*/); static int scale_set_value(/*scrollbar, value */); /* Public object methods */ /* Creates a scrollbar object. Consists of a label, a scrollbar and a label giving feedback to the user */ scrollbar_type scrollbar__create( parent, name) Widget parent; char * name; { scrollbar_type scrollbar; scrollbar = XtNew( scrollbar_struct); /* We need to have our own callback list, because callbacks from Motif and Athea are so different */ scrollbar->callbacks = list__create(); create_widgets( scrollbar, parent, name); return scrollbar; } /* Destroy the scrollbar object */ void scrollbar__destroy( scrollbar) scrollbar_type scrollbar; { int i; for (i = 0; i < list__get_count( scrollbar->callbacks); i++) { free( list__get_cell( scrollbar->callbacks, i)); } list__destroy( scrollbar->callbacks); XtDestroyWidget( scrollbar->scale); XtDestroyWidget( scrollbar->label); XtFree( (char *)scrollbar); } /* Set the value of the scrollbar and make any callbacks */ void scrollbar__set_value( scrollbar, value) scrollbar_type scrollbar; int value; { scrollbar->value = value; scale_set_value( scrollbar, value); call_callbacks( scrollbar, value); } /* Add a scrollbar callback. When the scrollbar value changes, the proc will be called back with a scrollbarCallbackStruct. */ void scrollbar__add_callback( scrollbar, proc, closure) scrollbar_type scrollbar; XtCallbackProc proc; XtPointer closure; { callback_node *node_ptr = (callback_node *)malloc( sizeof( callback_node)); node_ptr->proc = proc; node_ptr->closure = closure; list__add_end( scrollbar->callbacks, node_ptr); } /* Private object methods */ /* Make the scrollbar callbacks */ static void call_callbacks( scrollbar, value) scrollbar_type scrollbar; int value; { int i; callback_node * node_ptr; scrollbarCallbackStruct scrollbar_call_data; scrollbar_call_data.reason = 0; scrollbar_call_data.event = 0; scrollbar_call_data.pixel = 0; scrollbar_call_data.value = value; for (i = 0; i < list__get_count( scrollbar->callbacks); i++) { node_ptr = (callback_node *)list__get_cell( scrollbar->callbacks, i); (*node_ptr->proc)( scrollbar->scale, node_ptr->closure, &scrollbar_call_data); } } #ifdef MOTIF /* Called when the motif scrollbar moves. Makes all registered scrollbar callbacks */ static void scrollbar_callback( w, scrollbar, call_data) Widget w; scrollbar_type scrollbar; caddr_t call_data; { call_callbacks( scrollbar, ((XmScaleCallbackStruct *)call_data)->value); } #ifdef NOTUSED /* Returns the scrollbar widget's value */ static int scrollbar_get_value( scrollbar) scrollbar_type scrollbar; { int value; XmScaleGetValue( scrollbar->scale, &value); return value; } #endif /* Sets the scrollbar widget's value */ static int scale_set_value( scrollbar, value) scrollbar_type scrollbar; int value; { XmScaleSetValue( scrollbar->scale, value); } /* Creates the scrollbar widgets */ void create_widgets( scrollbar, parent, name) scrollbar_type scrollbar; Widget parent; char * name; { scrollbar->form = XtVaCreateManagedWidget(name, xmFormWidgetClass, parent, NULL); scrollbar->label = XtVaCreateManagedWidget("label", xmLabelWidgetClass, scrollbar->form, NULL); scrollbar->scale = XtVaCreateManagedWidget("bar", xmScaleWidgetClass, scrollbar->form, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, scrollbar->label, NULL); XmScaleGetValue( scrollbar->scale, &scrollbar->value); XtAddCallback( scrollbar->scale, XmNvalueChangedCallback, scrollbar_callback, (XtPointer)scrollbar); XtAddCallback( scrollbar->scale, XmNdragCallback, scrollbar_callback, (XtPointer)scrollbar); } #endif #ifdef ATHENA /* Functions */ static void set_feedback_value(/* scrollbar, value*/); static void move_thumb(/* scrollbar, thumb, shown*/); static void set_label_value(/* label_w, value*/); /* Macros */ #define SB_MAX 100.0 #define SB_MIN 0.0 #define thumb_to_value( thumb, shown) \ ((int)((thumb) / (1-(shown))* (SB_MAX - SB_MIN) + 0.5 - SB_MIN)) #define value_to_thumb( value, shown) \ ((value)*(1-(shown) + SB_MIN) / (SB_MAX - SB_MIN)) /* Called when the athena scrollbar is scrolled incrementally. Updates the feedback value and makes all registered callbacks. */ static void scrollbar_scroll_callback( w, scrollbar, position_ptr) Widget w; scrollbar_type scrollbar; XtPointer position_ptr; { Dimension length; float thumb; float shown; int position = (int)position_ptr; float change; /* 0.0 .. 1.0 - percentage of full-page change we should do */ /* Position is the number of pixels from left of scrollbar pointer is. Position > 0 indicates button 1, position < 0 indicates button 3 */ XtVaGetValues( scrollbar->scale, XtNlength, &length, XtNtopOfThumb, &thumb, XtNshown, &shown, NULL); change = (float)position / length; /* Scroll by the amount of thumb shown * amount of change we should for the given pointer position */ thumb += shown * change; move_thumb( scrollbar, thumb, shown); } /* Called when the athena scrollbar is moved in a jumpy fashion. Updates the feedback value and makes all registered callbacks. */ static void scrollbar_jump_callback( w, scrollbar, percent_ptr) Widget w; scrollbar_type scrollbar; float * percent_ptr; { float shown; float thumb = *percent_ptr; XtVaGetValues( scrollbar->scale, XtNshown, &shown, NULL); move_thumb( scrollbar, thumb, shown); } /* Moves thumb within valid values and updates the feedback value */ static void move_thumb( scrollbar, thumb, shown) scrollbar_type scrollbar; double thumb; double shown; { int value; /* Keep the value within the proper range */ if (thumb >= 1 - shown) /* Keep below 1, otherwise thumb stops redrawing due to Athena bug */ thumb = 1 - shown; else if (thumb < 0) thumb = 0; /* Set the thumb to the new position */ XawScrollbarSetThumb( scrollbar->scale, thumb, -1.0); value = thumb_to_value( thumb, shown); set_feedback_value( scrollbar, value); call_callbacks( scrollbar, value); } /* Returns the value of the scrollbar */ static int scrollbar_get_value( scrollbar) scrollbar_type scrollbar; { float thumb; float shown; XtVaGetValues( scrollbar->scale, XtNtopOfThumb, &thumb, XtNshown, &shown, NULL); return thumb_to_value( thumb, shown); } /* Sets the value of the scrollbar - updates thumb and feedback value */ static int scale_set_value( scrollbar, value) scrollbar_type scrollbar; int value; { float shown; XtVaGetValues( scrollbar->scale, XtNshown, &shown, NULL); /* Set the thumb to the new position */ XawScrollbarSetThumb( scrollbar->scale, value_to_thumb( value, shown), -1.0); set_feedback_value( scrollbar, value); } /* Updates the feedback label to the passed value */ static void set_feedback_value( scrollbar, value) scrollbar_type scrollbar; int value; { set_label_value( scrollbar->feedback, value); } /* Sets an athena label so it displays the passed value */ static void set_label_value( label_w, value) Widget label_w; int value; { char buff[15]; sprintf(buff,"%d", value); XtVaSetValues( label_w, XtNlabel, buff, NULL); } /* Create Athena widgets to simulate a scale witget with a label */ void create_widgets( scrollbar, parent, name) scrollbar_type scrollbar; Widget parent; char * name; { scrollbar->form = XtVaCreateWidget(name, formWidgetClass, parent, NULL); scrollbar->label = XtVaCreateManagedWidget("label", labelWidgetClass, scrollbar->form, NULL); scrollbar->feedback = XtVaCreateManagedWidget("feedback", labelWidgetClass, scrollbar->form, XtNfromHoriz, scrollbar->label, NULL); scrollbar->scale = XtVaCreateManagedWidget("bar", scrollbarWidgetClass, scrollbar->form, XtNfromVert, scrollbar->label, XtNfromHoriz, scrollbar->label, NULL); scrollbar->value = scrollbar_get_value( scrollbar); set_feedback_value( scrollbar, scrollbar->value); XtAddCallback( scrollbar->scale, XtNscrollProc, scrollbar_scroll_callback, (XtPointer)scrollbar); XtAddCallback( scrollbar->scale, XtNjumpProc, scrollbar_jump_callback, (XtPointer)scrollbar); XtManageChild( scrollbar->form); } #endif xball-3.0.1+dfsg/sim.h0000644000175000017500000000222114461637417015277 0ustar polveraripolverari/********************************************************************** * sim.h - simulation object declarations * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __SIM_H__ #define __SIM_H__ #include #include "items.h" #include "room.h" #include "demo.h" #include "menu.h" typedef struct { menu_type menu; items_type items; room_type room; demo_type demo; XtWorkProcId wpid; /* Work process id */ int delay; /* Amount of delay we should do */ Bool step_simulation; /* True if we are steeping the simulation */ } sim_struct_type, *sim_type; sim_type sim__create(/*w, items, room*/); void sim__destroy(/*sim*/); void sim__step_mcb(/*w, sim, call_data, extra*/); void sim__halt_mcb(/*w, sim, call_data, extra*/); #endif xball-3.0.1+dfsg/item.c0000644000175000017500000005357514461637417015462 0ustar polveraripolverari/********************************************************************** * item.c - defines the item object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include #ifdef MOTIF #include #endif /* Local headers */ #include "item.h" #include "room.h" #include "scrollbar.h" #include "color_l.h" #include "menu.h" #include "misc.h" #include "stipple.xbm" /* Macros */ #define SHADES 4 /* Number of shades for colors in the rgb.txt file */ #define ITEM_WIDTH 10 /* The item's default size */ #define ITEM_HEIGHT 10 #ifndef RGB_TXT #define RGB_TXT "/etc/X11/rgb.txt" #endif /* put_pixmap - Draws the item's pixmap to the specified location */ #define put_pixmap( item, x, y) \ XCopyArea(item->display, item->pixmap, item->window, \ item->static_data->gc, \ 0, 0, \ item->static_data->width, \ item->static_data->height, \ intf2int(x) - item->static_data->half_width, \ intf2int(y) - item->static_data->half_height) /* File scope variables */ static item_static_struct_type static_struct; /* Item object static data */ item_static_type static_data = &static_struct; static Bool static_data_initted = False; /* Resources */ typedef struct { int item_width; int item_height; char * rgb_txt; int elasticity; } app_data,*app_data_ptr; static app_data res_data; static XtResource resources[] = { { "itemWidth", "ItemWidth", XtRInt, sizeof(int), XtOffset(app_data_ptr,item_width), XtRImmediate, (caddr_t)ITEM_WIDTH }, { "itemHeight", "ItemHeight", XtRInt, sizeof(int), XtOffset(app_data_ptr,item_height),XtRImmediate, (caddr_t)ITEM_HEIGHT}, { "rgbTxt", "RgbTxt", XtRString, sizeof(char *), XtOffset(app_data_ptr,rgb_txt), XtRString, RGB_TXT} }; /* Functions */ static item_static_type static_data__create(/*display, window, background*/); static void draw_item(/* static_data, display, clear_gc, colors, pixmap, background*/); static void draw_circle(/* display, pixmap, x_offset, y_offset, width, height*/); static void draw_black_ball(/* display, background*/); static void draw_ball(/* display, pixmap, x_offset, y_offset, width, height*/); /* Public object methods */ /* Create the item object. The item is the thing that bounces on the screen */ /* The item is drawn to the screen after it is created */ item_type item__create( x, y, x_vel, y_vel) int x; int y; int x_vel; int y_vel; { item_type item; item = (item_type)malloc( sizeof( item_struct_type)); item->static_data = static_data; item->display = static_data->display; item->window = static_data->window; /* Draw with the next avaliable pixmap image (color) */ static_data->curr_pixmap = (static_data->curr_pixmap + 1) % static_data->num_colors; item->pixmap = static_data->pixmaps[ static_data->curr_pixmap]; /* Position are stored as intf (int-floats) to get more precision out of an int */ item->x = int2intf( x); item->y = int2intf( y); item->x_vel = int2intf( x_vel); item->y_vel = int2intf( y_vel); item->shown = False; item->rebounded = False; item__draw( item); #if 0 /* To generate demos */ printf("create %d,%d,%d,%d\n", intf2int(item->x),intf2int(item->y), intf2int(item->x_vel),intf2int(item->y_vel)); #endif return item; } /* Initializes the item's static data. This can only be done once there is a window, sice we have to get the background color. Thus, we are called from room's first refresh callback */ void item__init(toplevel, display, window, background) Widget toplevel; Display * display; Window window; Pixel background; { static_data = static_data__create( toplevel, display, window, background); static_data_initted = True; } /* Returns true of the item's static data is initialized */ Bool item__initted() { return static_data_initted; } /* Destroys an item */ void item__destroy( item) item_type item; { item__undraw( item, item->x, item->y); /* Erase item from screen */ free( (char *)item); } /* Draws the item to the screen if it is visible. Handles the case where the item was already visible on the screen. */ void item__draw( item) item_type item; { if (!item->shown && item->static_data->visible) { put_pixmap( item, item->x, item->y); item->shown = True; } } /* Erases the item from the screen */ void item__undraw( item, x, y) item_type item; intf x,y; { if (item->shown && item->static_data->visible) { put_pixmap( item, x, y); item->shown = False; } } /* Redraws the item on the screen, regardless of whether it is shown. This method shoulw be used when the window has to be refreshed. invisible items will not be drawn. */ void item__redraw( item) item_type item; { if (item->static_data->visible) { put_pixmap( item, item->x, item->y); item->shown = True; } } /* Move an item's image to a new location */ void item__move_pos( item, x, y) item_type item; int x,y; { item__undraw( item, item->x, item->y); item->x = int2intf(x); item->y = int2intf(y); item__draw( item); } /* Give an item a random velocity, based on the passed ranges */ void item__randomize( item, min_x_vel, max_x_vel, min_y_vel, max_y_vel) item_type item; int min_x_vel; int max_x_vel; int min_y_vel; int max_y_vel; { item->x_vel = int2intf(rand_range( min_x_vel, max_x_vel)); item->y_vel = int2intf(rand_range( min_y_vel, max_y_vel)); } /* Perform one item movement iteration, taking into account other balls, gravity, elasticity, and the room boundaries. The item's new position is calculated and the item's image is moved to the new location. Invisible items are not redrawn. */ void item__move( item, room, items) item_type item; room_type room; items_type items; { /* Calculate new position of item */ intf oldx = item->x; intf oldy = item->y; /* Calculate new y position */ /* Gravity adds to velocity */ if ((item->y < room__get_floor( room)) || (item->y_vel != 0)) { item->y_vel += room__get_gravity( room); } /* Move vertically based on velocity */ item->y += item->y_vel; if (item->y >= room__get_floor( room)) { /* item hit floor -- bounce off floor */ /* Reverse ball velocity */ item->y_vel = -item->y_vel; item->y += item->y_vel; if (ABS(item->y_vel) < room__get_gravity(room)) /* This helps dampen rounding errors that cause balls to bounce forever */ item->y_vel = 0; else { /* Ball velocity is reduced by the percentage elasticity */ item->y_vel *= item->static_data->elasticity; #if 1 item->y = room__get_floor( room) - (room__get_floor( room) - item->y) * item->static_data->elasticity; #else item->y = -item->y + room__get_floor( room)*2; #endif } } else if (item->y < room__get_ceiling( room)) { /* Reverse ball velocity */ item->y_vel = -item->y_vel; /* Ball velocity is reduced by the percentage elasticity */ item->y_vel *= item->static_data->elasticity; /* Bounce off the wall */ item->y = -item->y + room__get_ceiling( room)*2; } /* Calculate new x position */ /* Move horizontally based on velocity */ item->x += item->x_vel; if (item->x > room__get_right_wall(room)) { /* Hit right wall */ /* Reverse ball velocity */ item->x_vel = -item->x_vel; /* Ball velocity is reduced by the percentage elasticity */ item->x_vel *= item->static_data->elasticity; /* Bounce off the wall */ item->x = -item->x + room__get_right_wall( room)*2; } else if (item->x < room__get_left_wall( room)) { /* Hit left wall */ /* Reverse ball velocity */ item->x_vel = -item->x_vel; /* Ball velocity is reduced by the percentage elasticity */ item->x_vel *= item->static_data->elasticity; /* Bounce off the wall */ item->x = -item->x + room__get_left_wall( room)*2; } /* Slow ball if it is rolling on the floor */ if (ABS(item->y) >= room__get_floor(room) - room__get_gravity(room) && item->y_vel == 0) item->x_vel *= item->static_data->elasticity; /* Collide with other balls or ball being created */ if (item->static_data->ball_collide) { /* See if collided with the ball under the pointer being created */ item_type room_item = room__get_item( room); if (room_item != (item_type)0) { item__rebound_item(item, room_item); } /* See if collided with another item */ items__rebound_items( item, items); } /* See if item has come to a peaceful rest */ if (item__stopped(item, room)) { /* on floor && Not bouncing */ if (item->static_data->perpetual) { /* Just drop the ball from the ceiling */ item->y = room__get_ceiling( room); } else { if (item__stopped( item, room)) { item__undraw( item, oldx, oldy); return; /* Don't draw item */ } /* Slow down velocity once rolling based on elasticity */ if (item->x_vel > 0) item->x_vel *= item->static_data->elasticity; } } /* If item moved, redraw it in the new position */ if ((item->y != oldy || item->x != oldx) && static_data->visible) { /* Erase old object */ item__undraw( item, oldx, oldy); item__draw( item); } } /* See if items have hit and rebound them if they have. Moved_item is assumed to have just been moved. Only the moved item will have its x,y positions potentially changed. */ void item__rebound_item( moved_item, fixed_item) item_type moved_item; item_type fixed_item; { intf xdiff,ydiff; xdiff = moved_item->x - fixed_item->x; ydiff = moved_item->y - fixed_item->y; if (ABS(xdiff) < int2intf(moved_item->static_data->width) && ABS(ydiff) < int2intf(moved_item->static_data->height)) { SWAP( moved_item->x_vel, fixed_item->x_vel, intf); SWAP( moved_item->y_vel, fixed_item->y_vel, intf); if (moved_item->y_vel <= int2intf(moved_item->static_data->height) && fixed_item->y_vel <= int2intf(moved_item->static_data->height)) { moved_item->y += moved_item->y_vel; moved_item->y_vel += ydiff * moved_item->static_data->elasticity/10; fixed_item->y_vel -= ydiff * moved_item->static_data->elasticity/10; } if (moved_item->x_vel <= int2intf(moved_item->static_data->width) && fixed_item->x_vel <= int2intf(moved_item->static_data->width)) { moved_item->x += moved_item->x_vel; moved_item->x_vel += xdiff * moved_item->static_data->elasticity/10; fixed_item->x_vel -= xdiff * moved_item->static_data->elasticity/10; } } } /* A scrollbar callback method that sets all the balls' elasticity */ void item__set_elasticity_cb(w, closure, call_data) Widget w; caddr_t closure; scrollbarCallbackStruct * call_data; { static_data->elasticity = call_data->value / 100.0; } /* Return all items' width */ int item__get_width() { return static_data->width; } /* Return all items' height */ int item__get_height() { return static_data->height; } /* A menu callback (mcb) that sets all items' perpetual status */ void item__perpetual_mcb(w, closure, call_data, extra) Widget w; caddr_t closure; menuCallbackStruct * call_data; char * extra; { static_data->perpetual = call_data->set; } /* A menu callback (mcb) that sets all items' collide status */ void item__collide_mcb(w, closure, call_data, extra) Widget w; caddr_t closure; menuCallbackStruct * call_data; char *extra; { static_data->ball_collide = call_data->set; } /* Semi-private object methods */ /* Sets all items' perpetual status */ /* Note that the toggle must be set properly also */ void item__set_perpetual(set) Bool set; { static_data->perpetual = set; } /* Sets all items' collide status */ /* Note that the toggle must be set properly also */ void item__set_ball_collide(set) Bool set; { static_data->ball_collide = set; } /* Set all item's visible status */ /* Note that all items must be undrawn from the screen */ void item__set_visible(visible) Bool visible; { static_data->visible = visible; } /* Private object methods */ /* Load items resources */ static void get_resources( toplevel, display, window, background) Widget toplevel; Display *display; Window window; Pixel background; { XtGetApplicationResources(toplevel, (XtPointer)&res_data, resources, XtNumber(resources), (ArgList)NULL,(Cardinal)0); static_data->width = res_data.item_width; static_data->height = res_data.item_height; static_data->half_width = static_data->width / 2; static_data->half_height = static_data->height / 2; static_data->rgb_txt = res_data.rgb_txt; } /* Initialize the item's static data object */ static item_static_type static_data__create( toplevel, display, window, background) Widget toplevel; Display * display; Window window; Pixel background; { GC clear_gc; /* The following already set in xball_sys object: static_data->elasticity static_data->ball_collide static_data->perpetual */ get_resources( toplevel, display, window, background); static_data->visible = True; static_data->background = background; static_data->display = display; static_data->window = window; static_data->gc = XCreateGC(display, window, 0, 0); clear_gc = XCreateGC(display, window, 0, 0); static_data->curr_pixmap = 0; if (DisplayCells( display, DefaultScreen(display)) > 2) { /* Non-monochrome system */ color_list_type color_list = color_list__create(static_data->rgb_txt); color_type color; Colormap colormap = DefaultColormap(display, DefaultScreen(display)); XColor colors[ SHADES]; /* The color shades */ Pixel cells[ SHADES]; int pixmap_index; int shade; for (shade = 0; shade < SHADES; shade++) colors[ shade].flags = DoRed | DoGreen | DoBlue; for (color = color_list__get_last( color_list), pixmap_index = 0; color != (color_type)0; pixmap_index++) { if (!XAllocColorCells( display, colormap, /*contig =*/True, /*plane_masks=*/NULL, /*nplanes=*/0, /*pixels =*/cells, /*ncolors=*/SHADES)) break; /* All out of colors */ for (shade = SHADES-1; shade >= 0; shade--) { colors[ shade].red = color->r * 65535 / 255; colors[ shade].green = color->g * 65535 / 255; colors[ shade].blue = color->b * 65535 / 255; colors[ shade].pixel = cells[ shade]; color = color_list__get_prev( color_list); } if (shade == -1) { XStoreColors( display, colormap, colors, SHADES); } else { /* Problem with color list */ pixmap_index--; XFreeColors( display, colormap, cells, SHADES, /*nplanes=*/0); break; } static_data->pixmaps[ pixmap_index] = XCreatePixmap(display, window, static_data->width,static_data->height, DefaultDepth(display, DefaultScreen(display))); /* Draw the item onto the pixmap */ draw_item(static_data, display, clear_gc, colors, static_data->pixmaps[ pixmap_index], background); } /* printf("Created %d different colored balls (%d possible).\n", pixmap_index, color_list__get_count( color_list) / 4); */ color_list__destroy( color_list); static_data->num_colors = pixmap_index; } if ((static_data->num_colors == 0) || (DisplayCells( display, DefaultScreen(display)) == 2)) { /* Monochrome system or cannot allocate colors - just have 1 pixmap of a black ball */ draw_black_ball( display, background); } XFreeGC( display, clear_gc); XSetFunction( display, static_data->gc, GXxor); return static_data; } /* Draw an item in the passed colors on the passed pixmap */ static void draw_item( static_data, display, clear_gc, colors, pixmap, background) item_static_type static_data; Display *display; GC clear_gc; XColor *colors; Pixmap pixmap; Pixel background; { static struct { double x_offset, y_offset; /* The circle's offset on the item */ double width, height; /* The width & height of the circle */ } offsets[SHADES-1] = { 0.2, 0.2, 0.3, 0.3, 0.1, 0.1, 0.5, 0.5, 0.0, 0.0, 0.8, 0.8 }; int x; /* Clear pixmap */ XFillRectangle(display, pixmap, clear_gc, 0, 0, static_data->width, static_data->height); XSetForeground( display, static_data->gc, colors[SHADES-1].pixel ^ background); draw_circle(display, pixmap, static_data->gc, 0, 0, static_data->width-1, static_data->height-1); /* Draw the circles in the different shades. Shade SHADES-1 is darkest. */ for (x = SHADES-2; x >= 0; x--) { XSetForeground(display, static_data->gc, colors[x].pixel ^ background); draw_ball( display, pixmap, offsets[x].x_offset, offsets[x].y_offset, offsets[x].width, offsets[x].height); } /* Draw a white specularity smallest and offset */ XSetForeground(display, static_data->gc, WhitePixel(display, DefaultScreen(display)) ^ background); draw_ball( display, pixmap, 0.3, 0.3, 0.1, 0.1); /* Draw a little black shadow in the lower right corner */ XSetForeground(display, static_data->gc, BlackPixel(display, DefaultScreen(display)) ^ background); XDrawArc(display, pixmap, static_data->gc, 0, 0, static_data->width - 1, static_data->height - 1, 300*64, 35*64); } /* Draw a circle outline and filling at the size and offet determined by the ball's size */ static void draw_ball( display, pixmap, x_offset, y_offset, width, height) Display * display; Pixmap pixmap; double x_offset, y_offset; double width, height; { draw_circle( display, pixmap, static_data->gc, (int)(static_data->width * x_offset), (int)(static_data->height * y_offset), (int)(static_data->width * width), (int)(static_data->height * height)); } /* Draw a filled circle of the specified size and position */ static void draw_circle( display, pixmap, gc, x, y, width, height) Display * display; Pixmap pixmap; GC gc; int x, y; int width, height; { XDrawArc(display, pixmap, static_data->gc, x, y, width, height, 0, 360*64); XFillArc(display, pixmap, static_data->gc, x, y, width, height, 0, 360*64); } /* Draw a black ball onto the first pixmap */ static void draw_black_ball( display, background) Display * display; Pixel background; { Pixmap stipple_bitmap = XCreateBitmapFromData( display, RootWindow( display, DefaultScreen( display)), stipple_bits, stipple_width, stipple_height); static_data->pixmaps[ 0] = XCreatePixmap(display, RootWindow(display, DefaultScreen(display)), static_data->width, static_data->height, DefaultDepth( display, DefaultScreen(display))); /* Reset all pixels in the background so they will not have any effect when the pixmap is xor-copied */ XSetBackground(display, static_data->gc, 0); XFillRectangle(display, static_data->pixmaps[0], static_data->gc, 0, 0, static_data->width, static_data->height); XSetForeground(display, static_data->gc, BlackPixel(display,DefaultScreen(display)) ^background); /* Draw item */ draw_circle( display, static_data->pixmaps[0], static_data->gc, 0, 0, static_data->width-1, static_data->height-1); /* draw a grey specularity small and offset */ XSetStipple( display, static_data->gc, stipple_bitmap); XSetFillStyle( display, static_data->gc, FillOpaqueStippled); draw_ball( display, static_data->pixmaps[0], 0.2, 0.2, 0.3, 0.3); XSetFillStyle( display, static_data->gc, FillSolid); /* draw a white specularity smallest and offset */ XSetForeground(display, static_data->gc, WhitePixel(display,DefaultScreen(display)) ^background); draw_ball( display, static_data->pixmaps[0], 0.3, 0.3, 0.1, 0.1); static_data->num_colors = 1; XFreePixmap( display, stipple_bitmap); } #ifdef DEBUG item__print( item) item_type item; { printf("x,y_pos: %4d,%4d; x,y_vel: %4d,%4d, collide = %d\n", item__get_x( item), item__get_y( item), item__get_x_vel( item), item__get_y_vel( item), (int)static_data->ball_collide); } #endif xball-3.0.1+dfsg/man.xbm0000644000175000017500000000016214461637417015623 0ustar polveraripolverari#define man_width 5 #define man_height 7 static char man_bits[] = { 0x11, 0x11, 0x0a, 0x04, 0x0e, 0x15, 0x15}; xball-3.0.1+dfsg/xball-b.xbm0000644000175000017500000000017614461637417016376 0ustar polveraripolverari#define xball_b_width 5 #define xball_b_height 7 static char xball_b_bits[] = { 0x0f, 0x12, 0x12, 0x0e, 0x12, 0x12, 0x0f}; xball-3.0.1+dfsg/scrollbar.h0000644000175000017500000000326314461637417016501 0ustar polveraripolverari/********************************************************************** * scrollbar.h - declares scrollbar object * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ #ifndef __SCROLLBAR_H__ #define __SCROLLBAR_H__ #include #include "list.h" typedef struct { Widget form; Widget label; Widget scale; #ifdef ATHENA Widget feedback; /* Used to display value like Motif scale widget */ #endif int value; /* Current value of the scrollbar */ list_type callbacks; /* List of callbacks on this scrollbar */ } scrollbar_struct, *scrollbar_type; /* We need to make the callbacks ourself, because the callback data is so different between Motif and Athena */ typedef struct { int reason; XEvent * event; int value; int pixel; } scrollbarCallbackStruct; typedef void (*scrollbarCallbackProc)(/* Widget, caddr_t closure, scrollbarCallbackStruct call_data */); /* Inline functions */ #define scrollbar__get_value( scrollbar) ((scrollbar)->value) /* Regular functions */ scrollbar_type scrollbar__create(/* Widget w */); void scrollbar__destroy(/* scrollbar_type scrollbar */); void scrollbar__set_value(/* scrollbar_type *, int value */); void scrollbar__add_callback(/* scrollbar, proc, closure*/); #endif xball-3.0.1+dfsg/demo110000644000175000017500000000164214461637417015355 0ustar polveraripolveraricollide on create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 184,25,0,0 create 14,53,1,0 iterate 300 exit xball-3.0.1+dfsg/xball.man0000644000175000017500000000411114461637417016135 0ustar polveraripolverari.TH XBALL 6x "1/5/93" " " .SH NAME xball \- bounce balls on the screen .SH SYNOPSIS .B xball [ -help -delay .I delay -gravity .I percent-gravity -elasticity .I percent-elasticity -itemWidth .I ball-width -itemHeight .I ball-height -collide -perpetual -haltSim -demoFile .I demo-file -rgbTxt .I rgb.txt-file ] [XToolkit options] .sp .SH DESCRIPTION .PP .I XBall allows the user to create 3-d shaded balls, or to write and run demo which create and manipulate the balls in various ways. Documentation is included on-line via the Help menu and is not reproduced here. .SH OPTIONS Run xball -help for a decription of the command line options .SH DEMOS Several demo files are included with the distribution. To run all the demos, run 'run_demos'. .SH RESOURCES Most resources are avaliable for user modification. See the XBall app-defaults file for a complete listing of widgets, .sp Following is a list of the most useful resources: .RS .TP 3 \fBXBall*canvas.width, height\fR The default width and height of the window in which balls bounce in. .TP 3 \fBXBall.delay\fR The amount to slow the simulation, in case the computer is too fast. A reasonable range is 0 to 200. .TP 3 \fBXBall.itemWidth, itemHeight\fR The default width and height of the balls. .TP 3 \fBXBall.collide\fR If true, balls are colliding on startup. .TP 3 \fBXBall.perpetual\fR If true, balls are perpetual on startup. .TP 3 \fBXBall.haltSim\fR If true, simulation is halted on startup. .TP 3 \fBXBall.demoFile\fR Specified the file to run as a demo on startup. .TP 3 \fBXBall.rgbTxt\fR Specified the file to load for the colors. The default file is /etc/X11/rgb.txt .SH FILES .TP /etc/X11/rgb.txt X11 color names and values. .sp .SH AUTHOR .PP David Nedde (daven@ivy.wpi.edu). .br Packaged for the Debian project by Stephen Birch . .sp .SH COPYRIGHT Copyright 1991, 1993 David Nedde. .br Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee provided that the above copyright notice appears in all copies. It is provided "as is" without express or implied warranty. xball-3.0.1+dfsg/demo140000644000175000017500000000020614461637417015353 0ustar polveraripolverarielasticity 90 load_bitmap man.xbm 10,10 iterate 60 load_bitmap man.xbm 160,10 iterate 60 load_bitmap man.xbm 310,10 iterate 400 exit xball-3.0.1+dfsg/fallback.h0000644000175000017500000004231014461637417016251 0ustar polveraripolverari/* fallback.h generated by gen_fallback from XBall.ad - do not edit! */ "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "! XBall.ad - xball resource file", "!", "! Copyright 1991, David Nedde", "!", "! Permission to use, copy, modify, and distribute this", "! software and its documentation for any purpose and without fee", "! is granted provided that the above copyright notice appears in all copies.", "! It is provided 'as is' without express or implied warranty.", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "", "XBall.title: XBall - Written by David Nedde", "", "XBall*form.horizontalSpacing: 2", "XBall*form.verticalSpacing: 2", "XBall*form.width: 400", "XBall*form.height: 400", "XBall.allowShellResize: True", "XBall*resizable: True", "", "", "!!!!!!!!!!", "! Menu Bar", "!!!!!!!!!!", "", "XBall*menuBar.rightAttachment: ATTACH_FORM", "XBall*menuBar.leftAttachment: ATTACH_FORM", "! Athena resources", "XBall*menuBar*MenuButton.borderWidth: 0", "XBall*menuBar.borderWidth: 1", "XBall.formAW*translations: #override \n\ q: menu_action( quit) \n\ Ctrlq: menu_action( quit) \n\ Ctrlc: menu_action( quit) \n\ c: menu_action( clear) \n\ r: menu_action( randomize) \n\ s: menu_action( stepSim) \n\ p: menu_action( perpetual) \n\ b: menu_action( ballCollide) \n\ h: menu_action( haltSim) \n\ l: menu_action( loadBitmap) \n\ d: menu_action( runDemo) \n\ a: menu_action( about) \n\ ", "", "", "! File Submenu", "XBall*file.labelString: File", "XBall*file.label: File", "XBall*file.mnemonic: F", "XBall*about.labelString: About...", "XBall*about.label: About... A", "XBall*about.mnemonic: A", "XBall*about.accelerator: A", "XBall*about.acceleratorText: A", "XBall*runDemo.labelString: Run Demo...", "XBall*runDemo.label: Run Demo... D", "XBall*runDemo.mnemonic: D", "XBall*runDemo.accelerator: D", "XBall*runDemo.acceleratorText: D", "XBall*loadBitmap.labelString: Load Bitmap...", "XBall*loadBitmap.label: Load Bitmap... L", "XBall*loadBitmap.mnemonic: L", "XBall*loadBitmap.accelerator: L", "XBall*loadBitmap.acceleratorText: L", "XBall*quit.labelString: Quit", "XBall*quit.label: Quit Q", "XBall*quit.mnemonic: Q", "XBall*quit.accelerator: Q", "XBall*quit.acceleratorText: Q", "", "! Action Submenu", "XBall*actions.labelString: Actions", "XBall*actions.label: Actions", "XBall*actions.mnemonic: A", "XBall*clear.labelString: Clear", "XBall*clear.label: Clear C", "XBall*clear.mnemonic: C", "XBall*clear.acceleratorText: C", "XBall*clear.accelerator: C", "XBall*randomize.labelString: Randomize", "XBall*randomize.label: Randomize R", "XBall*randomize.mnemonic: R", "XBall*randomize.acceleratorText:R", "XBall*randomize.accelerator: R", "XBall*stopDemo.labelString: Stop Demo", "XBall*stopDemo.label: Stop Demo", "XBall*stepSim.labelString: Step Simulation", "XBall*stepSim.label: Step Simulation S", "XBall*stepSim.mnemonic: S", "XBall*stepSim.acceleratorText: S", "XBall*stepSim.accelerator: S", "", "! Options Submenu", "XBall*options.labelString: Options", "XBall*options.label: Options", "XBall*options.mnemonic: O", "XBall*perpetual.labelString: Perpetual", "XBall*perpetual.label: Perpetual P", "XBall*perpetual.mnemonic: P", "XBall*perpetual.acceleratorText: P", "XBall*perpetual.accelerator: P", "XBall*ballCollide.labelString: Ball Collide", "XBall*ballCollide.label: Ball Collide B", "XBall*ballCollide.mnemonic: B", "XBall*ballCollide.acceleratorText: B", "XBall*ballCollide.accelerator: B", "XBall*haltSim.labelString: Halt Simulation", "XBall*haltSim.label: Halt Simulation H", "XBall*haltSim.mnemonic: H", "XBall*haltSim.acceleratorText: H", "XBall*haltSim.accelerator: H", "", "! Help Submenu", "XBall*help.labelString: Help", "XBall*help.label: Help", "XBall*help.mnemonic: H", "XBall*onAuthor.labelString: On Author...", "XBall*onAuthor.label: On Author...", "XBall*onMenus.labelString: On Menus...", "XBall*onMenus.label: On Menus...", "XBall*onScroll.labelString: On Scrollbars...", "XBall*onScroll.label: On Scrollbars...", "XBall*onButtons.labelString: On Buttons...", "XBall*onButtons.label: On Buttons...", "XBall*onDemos.labelString: On Demos...", "XBall*onDemos.label: On Demos...", "XBall*onParams.labelString: On Parameters...", "XBall*onParams.label: On Parameters...", "", "", "XBall*elasticityBar.topAttachment: ATTACH_WIDGET", "XBall*elasticityBar.topWidget: menuBar", "XBall*elasticityBar.leftAttachment: ATTACH_FORM", "", "XBall*elasticityBar.label.labelString: Elasticity", "XBall*elasticityBar.label.leftAttachment: ATTACH_FORM", "XBall*elasticityBar.label.leftOffset: 10", "XBall*elasticityBar.label.topAttachment: ATTACH_FORM", "XBall*elasticityBar.label.bottomAttachment: ATTACH_FORM", "! Athena resources", "XBall*elasticityBar.fromVert: menuBar", "XBall*elasticityBar.label.label: Elasticity", "XBall*elasticityBar.label.borderWidth: 0", "", "XBall*elasticityBar.bar.width: 100", "XBall*elasticityBar.bar.orientation: HORIZONTAL", "XBall*elasticityBar.bar.maximum: 100", "XBall*elasticityBar.bar.minimum: 0", "XBall*elasticityBar.bar.showValue: True", "! Athena resources", "XBall*elasticityBar.bar.shown: 0.1", "XBall*elasticityBar.borderWidth: 0", "XBall*elasticityBar.label.borderWidth: 0", "XBall*elasticityBar.feedback.borderWidth: 0", "XBall*elasticityBar.defaultDistance: 0", "", "", "", "XBall*gravityBar.label.labelString: Gravity", "XBall*gravityBar.label.leftAttachment: ATTACH_FORM", "XBall*gravityBar.label.topAttachment: ATTACH_FORM", "XBall*gravityBar.label.bottomAttachment: ATTACH_FORM", "! Athena resources", "XBall*gravityBar.label.label: Gravity", "XBall*gravityBar.label.borderWidth: 0", "", "XBall*gravityBar.leftAttachment: ATTACH_WIDGET", "XBall*gravityBar.leftWidget: elasticityBar", "XBall*gravityBar.leftOffset: 20", "XBall*gravityBar.topAttachment: ATTACH_WIDGET", "XBall*gravityBar.topWidget: menuBar", "XBall*gravityBar.bar.width: 100", "XBall*gravityBar.bar.orientation: HORIZONTAL", "XBall*gravityBar.bar.maximum: 100", "XBall*gravityBar.bar.minimum: 0", "XBall*gravityBar.bar.showValue: True", "! Athena resources", "XBall*gravityBar.fromVert: menuBar", "XBall*gravityBar.horizDistance: 20", "XBall*gravityBar.fromHoriz: elasticityBar", "XBall*gravityBar.bar.shown: 0.1", "XBall*gravityBar.borderWidth: 0", "XBall*gravityBar.label.borderWidth: 0", "XBall*gravityBar.feedback.borderWidth: 0", "XBall*gravityBar.defaultDistance: 0", "", "XBall*canvas.resizable: True", "XBall*canvas.borderWidth: 1", "XBall*canvas.topAttachment: ATTACH_WIDGET", "XBall*canvas.topWidget: gravityBar", "XBall*canvas.bottomAttachment: ATTACH_FORM", "XBall*canvas.rightAttachment: ATTACH_FORM", "XBall*canvas.leftAttachment: ATTACH_FORM", "! Athena resources", "XBall*canvas.fromVert: gravityBar", "XBall*canvas.width: 400", "XBall*canvas.height: 330", "", "", "XBall*help_dialog_popup.title: XBall Information", "XBall*help_dialog_action_area.leftAttachment: ATTACH_FORM", "XBall*help_dialog_action_area.rightAttachment: ATTACH_FORM", "XBall*help_dialog_action_area.bottomAttachment: ATTACH_FORM", "XBall*help_dialog_action_area.close.labelString: Close", "XBall*help_dialog.close.label: Close", "XBall*help_dialog.separator.rightAttachment: ATTACH_FORM", "XBall*help_dialog.separator.leftAttachment: ATTACH_FORM", "XBall*help_dialog.separator.topOffset: 5", "XBall*help_dialog.separator.bottomAttachment: ATTACH_WIDGET", "XBall*help_dialog.separator.bottomWidget: help_dialog_action_area", "XBall*help_dialog*help_text.rows: 12", "XBall*help_dialog*help_text.columns: 60", "! Athena Resources", "XBall*help_dialog*help_textAW.displayCaret: False", "XBall*help_dialog*help_textAW.height: 150", "XBall*help_dialog*help_textAW.width: 470", "XBall*help_dialog*help_textAW.scrollHorizontal: WhenNeeded", "XBall*help_dialog*help_textAW.scrollVertical: WhenNeeded", "", "XBall*help_dialog*close.accelerators: \ Escape: set() notify() unset() \n\ Return: set() notify() unset() \n\ ", "", "", "", "!!!!!!!!!!!", "! Help text", "!!!!!!!!!!!", "!", "! Note that since fallback resources cannot handle \n in the text,", "! a ~ is used to indicate a newline.", "!", "!!!!!!!!!!", "", "XBall.pointerHelp: \ MOUSE BUTTON USAGE ~~~\ Button 1: o Hold down to create a ball. ~\ o Throw the ball by moving the mouse and ~\ letting go of button 1. ~\ o The ball will be going the speed of the ~\ pointer at release time. ~\ Button 2: o Hold down and move the mouse to create ~\ random velocity balls. ~\ Button 3: o Hold down and move the mouse to create ~\ zero velocity balls. \ ", "", "XBall.menuHelp: \ PULLDOWN MENU USAGE~~~\ File~\ About... A description of the program and author~\ Run Demo... Allows you to execute XBall demo files~\ See 'Help On Demos' for demo file format~\ Load Bitmap... Load an X bitmap as a set of balls~\ Analogous Demo command: ~\ bitmap filename posx,posy~\ Quit Exits the program~~\ Actions~\ Clear Clear the screen of balls~\ Analogous Demo command: clear~\ Randomize Give each ball a random velocity~\ Analogous Demo command: ~\ randomize minx,maxx,miny,maxy~\ Stop Demo Stops the execution of a demo in progress~\ Enabled by the Run Demo... menu option~\ Analogous Demo command: stop~\ Step Simulation Perform one step of the Halted simulation~\ Enabled by the Halt Simulation menu option~~\ Options~\ Perpetual If toggled on, balls will live forever~\ Analogous Demo command: perpetual on|off~\ Command line option: -perpetual True|False~\ Ball Collide If on, balls will collide with one another~\ Analogous Demo command: collide on|off~\ Command line option: -collide True|False~~\ Help Simulation Stop the simulation. You can then step the~\ simulation using Step Simulation menu option~~\ Help~\ On Menus Help using the menu system~\ On Scrollbars Help on the Elasticity and Gravity bars~\ On Buttons Help on using the mouse buttons to create balls~\ On Demos Help on the Demo language and how to run demos~\ On Parameters Help with command-line arguments to xball \ ", "", "", "XBall.scrollbarHelp: \ SCROLLBAR USAGE~~~\ Elasticity~\ o This scrollbar controls the balls' elasticity, or how~\ much energy is lost each time the balls hit the ground.~\ o Scrollbar to left: low elasticity (eggs)~\ o Scrollbar to right: high elasticity (superballs)~\ o Demo command: elasticity %d~\ o Command line options: -elasticity %d~~~\ Gravity~\ o This scrollbar controls the gravity, or how~\ much vertical velocity is added (subtracted)~\ from the balls for each iteration.~\ o Scrollbar to the left: Zero gravity (outer space)~\ o Scrollbar to the right: Large gravity (Jupiter)~\ o Demo command: gravity %d~\ o Command line options: -gravity %d \ ", "", "", "XBall.demoHelp: \ DEMO FILE COMMANDS~~\ %s1, %s2... - Replace with a string~\ %d1, %d2... - Replace with an integer~~\ create %d1,%d2,%d3,%d4: Create a ball with x,y position~\ %d1,%d2 and an x & y velocity~\ of %d2,%d4~\ randomize %d1,%d2,%d3,%d4: randomize velocities of all ~\ balls on screen with:~\ a max negative x velocity of %d1,~\ a max positive x velocity of %d2,~\ a max negative y velocity of %d3,~\ a max positive y velocity of %d4,~\ load_bitmap %s %d1,%d2: load a bitmap file (where %s is~\ the file path) to an x,y position~\ of %d1,%d2 on the screen~\ set_velocity %s %d1,%d2: set ball velocities (%s is~\ relative or absolute) to the x ~\ and y velocities %d1,%d2~\ gravity %d: set gravity to %d~\ elasticity %d: set elasticity to %d~\ backwards %d: Run simulation backwards %d iterations~\ visible %s: Make ball display 'on' or 'off'~\ iterate %d: simulate for %d iterations~\ sleep %d: sleep for %d seconds~\ perpetual %s: toggle perpetual (%s is 'on' or 'off')~\ collide %s: toggle ball collision (%s is 'on' or 'off')~\ window_width %d: Change window width to %d~\ window_height %d: Change window height to %d~\ backwards %d: Iterate backwards %d steps~\ clear: delete all balls in window~\ create_random %d1,%d2: create %d1 random balls with a ~\ max velocity of %d2~\ exit or quit: quit the xball program if demo is not~\ interactive~\ stop: stop demo but leave program alive \ ", "", "XBall.startupHelp: \ PROGRAM STARTUP PARAMETERS~~~\ Run xball -help for a list of command-line startup~\ ", " parameters", "", "XBall.aboutString: \ XBall Version 3.0.1~~\ April 1993~~\ The Premire Ball Bouncing Software~~\ Allows you to throw 3-D balls around in a 2-D space.~~\ Author (Send bugs, comments, and interesting demos to):~\ David Nedde~\ daven@ivy.wpi.edu~\ Computer Science Department~\ Worcester Polytechnic Institute~\ Worcester, MA 01609~~\ Copyright 1990, 1993 David Nedde~\ Permission to use, copy, modify, and distribute this~\ software and its documentation for any purpose and~\ without fee is granted provided that the above~\ copyright notice appears in all copies. It is~\ provided \"as is\" without express or implied warranty. \ ", "", "", "!!!!!!!!!!!!!!!!!", "! Menu Definition", "!!!!!!!!!!!!!!!!!", "!", "! Format:", "! pulldownName~", "! widgetName,widgetClass,menuCallbackName,optionalParams...~", "!", "! The widgetName is referenced above to set the menu's label.", "!", "! Note that the pulldownName of 'help' is automatically used as the help ", "! pulldown.", "!", "! Avaliable WidgetClasses are:", "! PushButton - push it and cause the action", "! ToggleButton - Push it and toggle the state", "! Separator - A line in the menu", "!", "! Avaliable menuCallbackNames avaliable (none take optional parameters):", "! runDemo - Lets user select a demo and run the demo", "! loadBitmap - Lets user load a bitmap file", "! quit - quits xball program", "! clear - Clear all balls from the screen", "! randomize - Randomize all balls from the screen", "! stopDemo - Stop a demo in progress", "! stepSim - Steps the simulation once (if simulation halted)", "! perpetual - Toggles perpetual balls state", "! ballCollide - Toggles colliding ball state", "! haltSim - Toggles halting the simulation", "! about - Displays help about the program", "! onMenus - Displays help on the menus", "! onScroll - Displays help on setting elasticity and gravity", "! onButtons - Displays help on using the mouse buttons to create balls", "! onDemos - Displays help on writing a demo", "! onParams - Displays help on command-line arguments", "!", "!!!!!!!!!!!!!!!!!", "", "XBall.menuDef: \ \ file~\ about,PushButton,about~\ runDemo,PushButton,runDemo~\ loadBitmap,PushButton,loadBitmap~\ separator,Separator~\ quit,PushButton,quit~\ actions~\ clear,PushButton,clear~\ randomize,PushButton,randomize~\ stopDemo,PushButton,stopDemo~\ stepSim,PushButton,stepSim~\ options~\ perpetual,ToggleButton,perpetual~\ ballCollide,ToggleButton,ballCollide~\ haltSim,ToggleButton,haltSim~\ help~\ about,PushButton,about~\ onMenus,PushButton,onMenus~\ onScroll,PushButton,onScroll~\ onButtons,PushButton,onButtons~\ onDemos,PushButton,onDemos~\ onParams,PushButton,onParams~\ ", "", NULL xball-3.0.1+dfsg/sgi.xbm0000644000175000017500000000067614461637417015644 0ustar polveraripolverari#define sgi_width 20 #define sgi_height 20 static char sgi_bits[] = { 0x80, 0x08, 0x00, 0x60, 0x35, 0x00, 0x18, 0xc5, 0x00, 0x06, 0x05, 0x03, 0x04, 0x05, 0x01, 0x18, 0xc5, 0x00, 0x60, 0x30, 0x00, 0x84, 0x0d, 0x01, 0x1a, 0xc2, 0x02, 0x62, 0x30, 0x02, 0x82, 0x0d, 0x02, 0x32, 0x65, 0x02, 0x0c, 0x85, 0x01, 0x60, 0x35, 0x00, 0x18, 0xc5, 0x00, 0x04, 0x05, 0x01, 0x04, 0x05, 0x01, 0x18, 0xc5, 0x00, 0x60, 0x35, 0x00, 0x80, 0x08, 0x00}; xball-3.0.1+dfsg/table.c0000644000175000017500000000474714461637417015610 0ustar polveraripolverari/********************************************************************** * table.c - table object definition * * Copyright 1993, David Nedde * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose and without fee is granted * provided that the above copyright notice appears in all copies. * It is provided "as is" without express or implied warranty. **********************************************************************/ /* System Headers */ #include #include /* Local headers */ #include "misc.h" #include "table.h" /* Structures */ typedef struct { char *key; void *data; } table_node_struct_type, *table_node_type; /* Public object methods */ /* Create a table object */ table_type table__create() { table_type table = (table_type)malloc( sizeof(table_struct_type)); table->list = list__create(); return table; } /* Free table but not the data contained by the table */ void table__destroy( table) table_type table; { table_node_type table_node; while ((table_node = (table_node_type)list__remove_last(table->list)) != (table_node_type)0) { free( table_node->key); free( table_node); } list__destroy( table->list); free( table); } /* Store data in the table by key */ void table__store( table, key, data) table_type table; char * key; void * data; { table_node_type table_node = (table_node_type)malloc( sizeof(table_node_struct_type)); table_node->key = my_strdup( key); table_node->data = data; list__add_end( table->list, (void *)table_node); } /* Get a value out of the table, given its key */ void *table__retrieve( table, key) table_type table; char * key; { table_node_type table_node; for (table_node = (table_node_type)list__get_first( table->list); table_node != (table_node_type)0; table_node = (table_node_type)list__get_next( table->list)) { if (strcmp( table_node->key, key) == 0) return table_node->data; } return (void *)0; } #ifdef DEBUG void table__dump( table) table_type table; { table_node_type table_node; for (table_node = (table_node_type)list__get_first( table->list); table_node != (table_node_type)0; table_node = (table_node_type)list__get_next( table->list)) { printf("key = %s\n", table_node->key); } } #endif