Source
...
Target
Commits (7)
  • Rik Griffin's avatar
    Redesigned window to show more of path. · 84527cc0
    Rik Griffin authored
    Added progress bar.
    Performance improvements, especially in 'slower' mode.
    Fixed 'count summary' bug.
    Fixed various compiler warnings.
    
    Version 0.49. Tagged as 'FilerAct-0_49'
    84527cc0
  • Rik Griffin's avatar
    Fixed progress bar bug in Filer Action. · 3d773e26
    Rik Griffin authored
    Progress bar was wrong during a CopyMove operation that required more
    memory than the available wimp slot.
    
    Version 0.50. Tagged as 'FilerAct-0_50'
    3d773e26
  • Robert Sprowson's avatar
    Didn't compile with PROGRESS_BAR turned off. · 62c87e72
    Robert Sprowson authored
    Rationalised all the switches a bit.
    Not tagged.
    62c87e72
  • Robert Sprowson's avatar
    Fix display of bytes-to-go when there are > 2G left. · b5fe2ebd
    Robert Sprowson authored
    Was doing a widening cast of a signed number to 64 bits, so showed 16 trillion bytes remaining.
    Fix templates to not say "stuff" by default in the name, as this was left on screen if an error occured before processing began.
    Things that read from clock() now use clock_t.
    Uncurled some "} else {" to match all the other files.
    Deleted the USE_LONG_LONG switch, it's been needed ever since harddiscs got bigger than 4G anyway.
    Anything assigned 'Yes' or 'No' changed to type BOOL.
    Variable 'source_of_finished_file' was signalling that a directory had been copied by setting the length to a -ve number. This has been refactored to use a BOOL instead, so files can have top bit set sizes.
    Fix bug in stack grab in count_objects_in_dir(), was grabbing an array of 2048 pointers (=8k) not 2048 bytes.
    Functions bytes_left_to_read() and bytes_left_to_write() reprototyped to return uint32_t not signed numbers.
    Still falls over copying files > 2G, but at least it gets the display right!
    
    Version 0.51. Tagged as 'FilerAct-0_51'
    b5fe2ebd
  • Robert Sprowson's avatar
    More BOOLs and things changed to C99 types. · 161f0f24
    Robert Sprowson authored
    Basically the same as version 0.51 otherwise.
    
    Version 0.52. Tagged as 'FilerAct-0_52'
    161f0f24
  • Robert Sprowson's avatar
    Swap magic constants for defines from headers. · 4b9400d5
    Robert Sprowson authored
    OS_FSControl, OS_File, OS_GBPB, OS_Args, OS_Find now use HighFSI.h.
    Indentation made more consistent.
    Variety of DEBUG macros changed to allow them to be enabled and disabled on a per-file basis.
    Put USE_RED_ERROR box switch into options.h (undefined though).
    Functionally equivalent to 0.52, but lots of diffs.
    
    Version 0.53. Tagged as 'FilerAct-0_53'
    4b9400d5
  • Robert Sprowson's avatar
    Fix to work with files > 2G. · 743fa9c2
    Robert Sprowson authored
    A good rake over the code to change filesizes to be uint32_t not ints.
    Change makefile to use StdTools.
    Shuffle icon clipping in the templates to allow for maximal numbers by moving the text a bit to the right, still fits even in system font.
    A couple more ints swapped for BOOLs.
    The memmanage code is largely unchanged and makes extensive use of signed numbers, partly because the wimpslot setting API does. This will all fall over in a big mess if the wimpslot ever gets >2G, but then the API would need changing for that to happen anyway.
    Function count_objects_in_dir swapped to use os_gbpb.
    Structure search_nest_level gains a 'counted' flag rather than signalling counting is needed by setting the filesize to -1.
    Should now be good for up to 4 billion files each of 4 billion bytes.
    
    Version 0.54. Tagged as 'FilerAct-0_54'
    743fa9c2
......@@ -30,17 +30,11 @@ EXP_HDR = <export$dir>
#
# Generic options:
#
MKDIR = cdir
AS = objasm
CC = cc
CP = copy
LD = link
RM = remove
WIPE = -wipe
DFLAGS =
include StdTools
#DFLAGS = -Ddebugfile="\"RAM::0.$.out\""
AFLAGS = -depend !Depend -Stamp -quit
CFLAGS = -c -depend !Depend -ffah ${INCLUDES} ${DFLAGS}
CFLAGS = -c -throwback -depend !Depend -ffah ${INCLUDES} ${DFLAGS}
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
......@@ -130,12 +124,12 @@ install_rom: ${TARGET}
@echo ${COMPONENT}: rom module installed
clean:
${WIPE} o.* ${WFLAGS}
${WIPE} oa.* ${WFLAGS}
${WIPE} app.* ${WFLAGS}
${WIPE} rm.* ${WFLAGS}
${WIPE} linked.* ${WFLAGS}
${WIPE} map.* ${WFLAGS}
${XWIPE} o.* ${WFLAGS}
${XWIPE} oa.* ${WFLAGS}
${XWIPE} app.* ${WFLAGS}
${XWIPE} rm.* ${WFLAGS}
${XWIPE} linked.* ${WFLAGS}
${XWIPE} map.* ${WFLAGS}
${RM} ${TARGET}
${RM} s.ModuleWrap
@echo ${COMPONENT}: cleaned
......
No preview for this file type
......@@ -82,13 +82,16 @@ S:Slower
77:Stamp
78:Check
79:continue the operation
80:Paused
80a32/80a36/80a41/80a46/80a51/80a56/80a62/80a67/80a82:Paused %c%s
81:There is a %s operation in progress.
82:Writing
84:Found
85:Finished
86:%d locked item(s) not deleted
87:Disc full
87a32/87a36/87a41/87a46/87a51/87a56/87a62/87a67/87a82:Disc full when %c%s
88:Error
88a32/88a36/88a41/88a46/88a51/88a56/88a62/88a67/88a82:Error when %c%s
89:Filer Action Window
90:Options
......
No preview for this file type
......@@ -14,3 +14,4 @@
|
Set FilerAct$Path Resources:Resources.FilerAct.
UnSet Alias$Filer_Action
UnSet Alias$Filer_Action2
......@@ -13,4 +13,5 @@
| limitations under the License.
|
Set FilerAct$Path <Obey$Dir>.^.Resources.<Locale>.
Set Alias$Filer_Action2 <Obey$Dir>.^.app.FilerAct %%*0
Set Alias$Filer_Action <Obey$Dir>.^.app.FilerAct %%*0
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.48"
Module_Version SETA 48
Module_MajorVersion SETS "0.54"
Module_Version SETA 54
Module_MinorVersion SETS ""
Module_Date SETS "11 Jun 2009"
Module_ApplicationDate SETS "11-Jun-09"
Module_Date SETS "23 Oct 2011"
Module_ApplicationDate SETS "23-Oct-11"
Module_ComponentName SETS "FilerAct"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/FilerAct"
Module_FullVersion SETS "0.48"
Module_HelpVersion SETS "0.48 (11 Jun 2009)"
Module_FullVersion SETS "0.54"
Module_HelpVersion SETS "0.54 (23 Oct 2011)"
END
/* (0.48)
/* (0.54)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.48
#define Module_MajorVersion_CMHG 0.54
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 Jun 2009
#define Module_Date_CMHG 23 Oct 2011
#define Module_MajorVersion "0.48"
#define Module_Version 48
#define Module_MajorVersion "0.54"
#define Module_Version 54
#define Module_MinorVersion ""
#define Module_Date "11 Jun 2009"
#define Module_Date "23 Oct 2011"
#define Module_ApplicationDate "11-Jun-09"
#define Module_ApplicationDate "23-Oct-11"
#define Module_ComponentName "FilerAct"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/FilerAct"
#define Module_FullVersion "0.48"
#define Module_HelpVersion "0.48 (11 Jun 2009)"
#define Module_LibraryVersionInfo "0:48"
#define Module_FullVersion "0.54"
#define Module_HelpVersion "0.54 (23 Oct 2011)"
#define Module_LibraryVersionInfo "0:54"
......@@ -12,8 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if 0
#define debugbut
#define debugbut(k) dprintf k
#else
#define debugbut(k) /* Disabled */
#endif
#include <stdio.h>
......@@ -21,6 +24,7 @@
#include <string.h>
#include <stdint.h>
#include <ctype.h>
#include <time.h>
#include "os.h"
#include "wimp.h"
......@@ -45,7 +49,7 @@
static void null_activity( action_environment * );
static void pause_operation( action_environment * );
static void continue_operation( action_environment * );
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
static void faster_operation( action_environment * );
#endif
static void skip_file( action_environment * );
......@@ -65,7 +69,7 @@ const button_set abort_pause_buttons =
null_activity,
null_activity,
pause_operation,
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
faster_operation,
#else
null_activity,
......@@ -75,7 +79,7 @@ const button_set abort_pause_buttons =
"",
"",
"4",
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
"FS"
#else
""
......@@ -87,7 +91,7 @@ const button_set abort_pause_buttons =
NULL,
NULL,
"6",
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
"F"
#else
NULL
......@@ -288,7 +292,9 @@ static void set_button( action_environment *env, int button, const char *text )
/*
Ensure button exists before setting field
*/
wimp_set_icon_state( dbox_handle, button, 0, wimp_IDELETED | wimp_IREDRAW );
wimp_iconflags flags = (wimp_iconflags) 0;
wimp_iconflags mask = (wimp_iconflags) (wimp_IDELETED | wimp_IREDRAW);
wimp_set_icon_state( dbox_handle, button, flags, mask );
dbox_setfield( env->status_box, button, msgs_lookup((char *)text) );
}
else
......@@ -304,7 +310,9 @@ static void set_button( action_environment *env, int button, const char *text )
if ( !err )
{
wimp_set_icon_state( dbox_handle, button, wimp_IDELETED | wimp_IREDRAW, wimp_IDELETED | wimp_IREDRAW );
wimp_iconflags flags = (wimp_iconflags) (wimp_IDELETED | wimp_IREDRAW);
wimp_iconflags mask = flags;
wimp_set_icon_state( dbox_handle, button, flags, mask );
r.w = dbox_handle;
r.box = icondata.box;
......@@ -337,7 +345,9 @@ void switch_buttons( action_environment *env, const button_set *new_buttons )
show_faster_stuff( env );
event_setmask( wimp_EMNULL | wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG );
wimp_emask mask = (wimp_emask) (wimp_EMNULL | wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG);
event_setmask( mask );
}
else
{
......@@ -351,16 +361,18 @@ void switch_buttons( action_environment *env, const button_set *new_buttons )
*/
read_next_node_parameters( env->test_search );
event_setmask( wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG );
wimp_emask mask = (wimp_emask) (wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG);
event_setmask( mask );
}
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
/* Ensure we get the buttons we really need */
if ( new_buttons == &abort_pause_buttons )
{
set_faster_state( env );
}
#endif
#endif
}
void abort_operation( action_environment *env )
......@@ -372,28 +384,22 @@ void abort_operation( action_environment *env )
static void pause_operation( action_environment *env )
{
char info_buffer[ Info_Field_Length + 10 ];
set_button( env, Misc_Button, "26" );
env->button_actions.button_helps[ Misc_Button - Abort_Button ] = "79";
env->button_actions.misc_action = continue_operation;
strcpy(info_buffer, "80a");
strcat(info_buffer, env->current_info_token);
sprintf(info_buffer, msgs_lookup(info_buffer), tolower(env->current_info[0]), &env->current_info[1]);
dbox_setfield( env->status_box, Top_Info_Field, info_buffer );
last_top_info_field = info_buffer;
set_top_info_field_with_current_info(env, "80a", "80");
dbox_showstatic( env->status_box );
event_setmask( wimp_EMNULL | wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG );
wimp_emask mask = (wimp_emask) (wimp_EMNULL | wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG );
event_setmask( mask );
}
#ifdef UseFasterButton
#ifdef USE_FASTER_BUTTON
/* JRF: Calls the same thing as the menu option */
static void faster_operation( action_environment *env )
{
......@@ -419,7 +425,7 @@ static void continue_operation( action_environment *env )
static void null_activity( action_environment *env )
{
env = env; /* keep the compiler quiet */
IGNORE(env);
}
/*
......@@ -567,9 +573,7 @@ static void view_object( action_environment *env )
*/
static void restart_operation( action_environment *env )
{
#ifdef debugbut
dprintf( "restart_operation: env=&%8X\n", (int)env );
#endif
debugbut(( "restart_operation: env=&%8X\n", (int)env ));
if ( env->action == Check_Full_Reading )
restart_file_read();
......@@ -594,7 +598,7 @@ void button_event_handler( dbox db, void *handle )
{
action_environment *env = handle;
db = db; /* keep the compiler quiet */
IGNORE(db);
switch( dbox_get( env->status_box ))
{
......
......@@ -16,16 +16,10 @@
Chain manipulation routines.
*/
#if 0
#define debugchain
#endif
#include <stdio.h>
#include "debug.h"
#ifndef __chains_h
#include "chains.h"
#endif
void chain_remove_link( chain_link *link )
{
......
......@@ -12,14 +12,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if 0
#define debuginit
#define debuginit(k) dprintf k
#else
#define debuginit(k) /* Disabled */
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <locale.h>
#include <time.h>
#include "os.h"
#include "wimp.h"
......@@ -33,7 +37,7 @@
#include "msgs.h"
#include "menu.h"
#include "Options.h"
#include "allerrs.h"
#include "malloc+.h"
#include "listfiles.h"
......@@ -66,7 +70,7 @@ static void remove_processor( void )
}
static void near_mouse_position_window( char *window_name )
{
{
template *tplt = template_find( window_name );
wimp_mousestr ptr;
os_error *err;
......@@ -105,15 +109,15 @@ static wimp_msgaction Messages[] = {
wimp_MFilerAddSelection,
wimp_MFilerAction,
wimp_MFilerControlAction,
0
wimp_MCLOSEDOWN /* list terminator (0, but with the right type) */
};
os_error *initialise( action_environment *env, int argc, char *argv[] )
{
os_error *err;
argc = argc; /* keep the compiler quiet */
argv = argv; /* keep the compiler quiet */
IGNORE(argc); /* keep the compiler quiet */
IGNORE(argv); /* keep the compiler quiet */
overflowing_initialise();
......@@ -125,20 +129,22 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
wimpt_messages(Messages);
wimpt_init(msgs_lookup("89"));
template_init();
debuginit(( "Resources initialised\n" ));
#ifdef debuginit
#ifdef debug
/* Test errors. */
{ os_error *err;
{
os_error *err;
err = error( mb_slotsize_too_small );
dprintf("%d: %s\n", err->errnum, err->errmess);
debuginit(( "%d: %s\n", err->errnum, err->errmess ));
err = error( mb_malloc_failed );
dprintf("%d: %s\n", err->errnum, err->errmess);
debuginit(( "%d: %s\n", err->errnum, err->errmess ));
err = error( mb_unexpected_state );
dprintf("%d: %s\n", err->errnum, err->errmess);
debuginit(( "%d: %s\n", err->errnum, err->errmess ));
err = error( mb_broken_templates );
dprintf("%d: %s\n", err->errnum, err->errmess);
debuginit(( "%d: %s\n", err->errnum, err->errmess ));
}
#endif
#endif
/*
Get the memmanagement onto the right footing
......@@ -150,7 +156,7 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
/*
re-position the window near the mouse
*/
near_mouse_position_window( Main_Window );
near_mouse_position_window( MAIN_TEMPLATE_NAME );
/*
start up the dbox wimplib stuff
......@@ -165,11 +171,12 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
atexit( remove_processor );
/*
create a window for ourselved
create a window for ourself
*/
env->status_box = dbox_new( Main_Window );
env->status_box = dbox_new( MAIN_TEMPLATE_NAME );
if ( env->status_box == NULL )
return error( mb_broken_templates );
env->window_handle = dbox_syshandle( env->status_box );
/*
Attach the button event handler
......@@ -177,7 +184,7 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
dbox_eventhandler( env->status_box, button_event_handler, env );
/*
Give ourselves a menu
Give ourself a menu
*/
env->option_menu = menu_new( msgs_lookup( "90" ), msgs_lookup( "91" ));
if ( env->option_menu == NULL )
......@@ -197,7 +204,7 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
/*
Enable only those events we're interested in
*/
event_setmask( wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG );
event_setmask( (wimp_emask)(wimp_EMPTRLEAVE | wimp_EMPTRENTER | wimp_EMUSERDRAG) );
/*
Initialise an empty search context and boxchange information.
......@@ -208,10 +215,12 @@ os_error *initialise( action_environment *env, int argc, char *argv[] )
env->flex_memory = No;
env->disable_flex = No;
env->in_error = No;
#ifdef USE_PROGRESS_BAR
env->progress = 0;
#endif
last_top_info_field = NULL;
/*
Make sure we don't go away when the window's closed
*/
......
This diff is collapsed.
......@@ -15,7 +15,7 @@
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <stdint.h>
#include <locale.h>
#include "dbox.h"
......@@ -23,10 +23,8 @@
#include "Options.h"
#include "dboxlong.h"
#ifdef USE_LONG_LONG
#ifdef USE_COMMAS
static void cvtlong(char *out, uintmax_t num)
static void cvtlong(char *out, uint64_t num)
{
struct lconv *l = localeconv();
char buffer[128];
......@@ -64,7 +62,7 @@ static void cvtlong(char *out, uintmax_t num)
#define cvtlong(buf, n) snprintf(buf, "%ju", n)
#endif
void dbox_setlongnumeric(dbox d, dbox_field f, uintmax_t n)
void dbox_setlongnumeric(dbox d, dbox_field f, uint64_t n)
{
char buf[128];
......@@ -72,5 +70,3 @@ void dbox_setlongnumeric(dbox d, dbox_field f, uintmax_t n)
dbox_setfield(d, f, buf);
}
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -15,11 +15,9 @@
/*
Header file for initialise.c
*/
#define wimp_MFilerSelectionDirectory 0x403
#define wimp_MFilerAddSelection 0x404
#define wimp_MFilerAction 0x405
#define wimp_MFilerControlAction 0x406
#define wimp_MSETSLOT 0x400c5
#define wimp_MFilerSelectionDirectory ((wimp_msgaction)0x403)
#define wimp_MFilerAddSelection ((wimp_msgaction)0x404)
#define wimp_MFilerAction ((wimp_msgaction)0x405)
#define wimp_MFilerControlAction ((wimp_msgaction)0x406)
os_error *initialise( action_environment *env, int argc, char *argv[] );
......@@ -19,18 +19,18 @@
#define OPTIONS_H
/* The faster button appears on the main window */
#define UseFasterButton
#define USE_FASTER_BUTTON
/* Are we using very long numbers in the boxes ? */
#define USE_LONG_LONG
/* (only if long numbers) use commas in the numbers */
/* Use commas in the numbers */
#define USE_COMMAS
/* Can we drag things to the window to perform more operations */
/* #define USE_LOAD_OPERATIONS */
/* Percent complete estimate shown */
#define USE_PROGRESS_BAR
/* Show completion in the title too */
#define USE_STATUS_IN_TITLE
/* Don't exempt some things - testing all */
/* #define CONFIRM_MEANS_CONFIRM_ALL */
/* Change dialogue box to red when fault occurs */
#undef USE_RED_ERROR
#endif
......@@ -88,21 +88,22 @@ typedef struct action_environment
/* wimplib handle onto the dialogue box */
dbox status_box;
/* wimp handle of the window */
int window_handle;
/* handle onto menu */
menu option_menu;
/* information regarding showing/hiding box in a delayed fashion */
int time_to_boxchange;
clock_t time_to_boxchange;
int boxchange_direction;
/* numeric quantities for progress lines */
#ifdef USE_LONG_LONG
uintmax_t top_progress;
uintmax_t bottom_progress;
#else
unsigned int top_progress;
unsigned int bottom_progress;
#endif
uint64_t top_progress;
uint64_t bottom_progress;
#ifdef USE_PROGRESS_BAR
uint32_t progress;
#endif
/* current overall operation (copying/counting/deleting etc) */
actions_possible operation;
......@@ -129,10 +130,10 @@ typedef struct action_environment
int source_directory_name_length;
/* Record of locked files not deleted */
int locked_not_deleted;
uint32_t locked_not_deleted;
/* Mask to use when setting access on directories for NetFS (KLUDGE) */
int directory_access_setting_mask;
uint32_t directory_access_setting_mask;
/* these indicate which switches apply */
int verbose:1;
......@@ -167,11 +168,13 @@ void switch_to_reading( action_environment * );
void switch_to_writing( action_environment * );
void show_faster_stuff( action_environment *env );
void toggle_faster( action_environment *env );
extern void set_top_info_field_with_current_info(action_environment *env, char *token1, char *token2);
extern char *last_top_info_field;
extern const char *last_top_info_field;
extern action_environment env;
extern int __root_stack_size;
/*
Delays for displaying verbose box and removing non-verbose box
in 1/100ths of a second
......@@ -183,7 +186,6 @@ extern int __root_stack_size;
/*
Dialogue box fields
*/
#define Top_Info_Field 1
#define Bottom_Info_Path 2
#define Top_Progress_Field 3
#define Bottom_Progress_Field 4
......@@ -195,11 +197,15 @@ extern int __root_stack_size;
#define Misc_Button 10
#define Skip_Button 11
#define Error_Field 12
#define Bottom_Info_Leaf 15
#define Progress_Bar 16
#define Progress_Bar_BBox 15
/* 1 less than the space allocated for the icon's indirected string */
#define Top_Info_Field_Length 79
/*
Window names
*/
#define Main_Window "FCount"
#define Info_Field_Length 64
#define MAIN_TEMPLATE_NAME "FCount"
#define QUERY_TEMPLATE_NAME "query"
......@@ -14,10 +14,4 @@
*/
/* Big numbers in dboxes */
#include "Options.h"
#ifdef USE_LONG_LONG
void dbox_setlongnumeric(dbox d, dbox_field f, uintmax_t n);
#else
#define dbox_setlongnumeric(x,y,z) dbox_setnumeric(x,y,z);
#endif
void dbox_setlongnumeric(dbox d, dbox_field f, uint64_t n);
......@@ -17,29 +17,30 @@
*/
#ifndef debug
#ifdef debugtube
#define debug
#else
#ifdef debugfile
#define debug
#endif
#endif
#ifdef debugtube
#define debug
#else
#ifdef debugfile
#define debug
#endif
#endif
#endif
#ifdef debug
#include "werr.h"
#define assert( e ) ((e) ? (void)0 : werr(1, "assert failed: '%s' in file %s at line %d", #e, __FILE__, __LINE__))
extern void dprintf( const char *str, ... );
#ifdef debugfile
extern FILE *debugf;
#endif
extern void dprintf( const char *str, ... );
#define IGNORE(x) (void)(x)
#define assert( e ) ((e) ? (void)0 : werr(1, "assert failed: '%s' in file %s at line %d", #e, __FILE__, __LINE__))
#else
#define IGNORE(x) (void)(x)
#define assert( ignore )
#endif