Commit 9dd4aca5 authored by Stewart Brodie's avatar Stewart Brodie

Merge of multiple versions of RISC_OSLib.

Detail:
  This work may be incomplete - hence import on a branch.
  It has NOT been tested.
Admin:
  Might even build.


Version 5.33, 4.50.2.1. Tagged as 'RISC_OSLib-5_33-4_50_2_1'
parent 8159da18
......@@ -13,12 +13,12 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.33"
Module_Version SETA 533
Module_MinorVersion SETS ""
Module_Date SETS "10 May 2001"
Module_ApplicationDate2 SETS "10-May-01"
Module_ApplicationDate4 SETS "10-May-2001"
Module_MinorVersion SETS "4.50.2.1"
Module_Date SETS "02 Jul 2001"
Module_ApplicationDate2 SETS "02-Jul-01"
Module_ApplicationDate4 SETS "02-Jul-2001"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.33"
Module_HelpVersion SETS "5.33 (10 May 2001)"
Module_FullVersion SETS "5.33 (4.50.2.1)"
Module_HelpVersion SETS "5.33 (02 Jul 2001) 4.50.2.1"
END
......@@ -4,19 +4,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.33
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 10 May 2001
#define Module_MinorVersion_CMHG 4.50.2.1
#define Module_Date_CMHG 02 Jul 2001
#define Module_MajorVersion "5.33"
#define Module_Version 533
#define Module_MinorVersion ""
#define Module_Date "10 May 2001"
#define Module_MinorVersion "4.50.2.1"
#define Module_Date "02 Jul 2001"
#define Module_ApplicationDate2 "10-May-01"
#define Module_ApplicationDate4 "10-May-2001"
#define Module_ApplicationDate2 "02-Jul-01"
#define Module_ApplicationDate4 "02-Jul-2001"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.33"
#define Module_HelpVersion "5.33 (10 May 2001)"
#define Module_FullVersion "5.33 (4.50.2.1)"
#define Module_HelpVersion "5.33 (02 Jul 2001) (4.50.2.1)"
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* © Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -15,19 +44,14 @@
/*
* Title: akbd.c
* Purpose: Access to Archimedes keyboard under the Wimp.
* Author: W. Stoye
* Status: Arthur-specific
* History:
* 13-Oct-87: started
* 13-Dec-87: converted to C.
* 11-May-91: ECN: turned stack checking off
* History: IDJ: 05-Feb-92: prepared for source release
*/
#include "h.os"
#include "h.trace"
#include "h.akbd"
/* see page 58 of June 9th Reference Manual, OSBYTE &81 (129) */
/* see page 58 of Programmer's Reference Manual, OSBYTE &81 (129) */
#pragma -s1
int akbd_pollsh(void)
......@@ -54,24 +78,24 @@ int akbd_pollkey(int *keycode /*out*/)
int y = 0;
(void) os_byte(129, &x, &y);
tracef2("PollKey returns %i %i.\n", x, y);
if (y==0 && x==0) {
if ((x + y) == 0)
{
/* it's a function key: 0, followed by the actual code. */
x = 0;
y = 0;
(void) os_byte(129, &x, &y);
if (y==0 && x>=128) {
if (y==0 && x>=128)
{
/* bona fide function key */
*keycode = 256 + x;
} else {
/* he's typing ahead with a control-@: sorry boy, you loose
the next key. */
*keycode = 0;
};
}
return(1);
} else {
*keycode = x;
return(y==0);
};
}
}
#pragma -s0
......
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -17,14 +44,8 @@
* Title: alarm.c
* Purpose: alarm facilities for wimp programs, using non-busy waiting
* for idle events
* Author: IDJ
* Status: under development
* History: 20-Mar-89 IDJ created
* 21-Mar-89 IDJ modified kludge to alarm_timedifference
* 21-Mar-89 IDJ added alarm__laterthan macro
* 08-May-91 ECN #ifndefed out unused ROM functions
* 09-May-91 ECN use swi names instead of nos.
* 14-Jun-91 IDJ timedifference put back in
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#include <stdlib.h>
......
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -15,20 +43,8 @@
/*
* Title: baricon.c
* Purpose: Support placing of an icon on the icon bar.
* History:
* 21-Mar-88 WRS extracted from ArcEdit
* 14-Apr-89 IDJ fixed Cast problem in baricon__win_event_handler
* usr function was passed in via void *handle. It is now
* (under C3.00), illegal to cast it back to func ptr.
* 6-Jun-89 IDJ last minute hack - added baricon_newsprite
* 7-Jun-89 IDJ extra hack. Roger says redraw of icon bar not good,
* so do horrible grubbies to stop this
* 13-Mar-90 IDJ allow multiple calls to baricon (ie remove some statics).
* set icon size correctly (thanks for help from Neil)
* 24-Apr-90 IDJ added baricon_text_and_sprite()
* 23-Jul-90 LDS/IDJ added baricon_left (split baricon into do_baricon)
* 08-May-91 ECN #ifndefed out unused ROM functions
* 09-May-91 ECN use swi names instead of nos.
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#include <string.h>
......@@ -57,13 +73,15 @@ static void baricon__win_event_handler(wimp_eventstr *e, void *handle)
handle = handle;
tracef1("icon bar event %i.\n", e->e);
if (e->e == wimp_EBUT) { /* key click */
if ((e->data.but.m.bbits & wimp_BLEFT) != 0) {
if (e->e == wimp_EBUT)
{ /* key click */
if ((e->data.but.m.bbits & wimp_BLEFT) != 0)
{
/* left click : call registered handler */
tracef0("icon bar left click.\n");
(*baricon__leftclickproc)(e->data.c.i);
};
};
}
}
}
static wimp_icreate baricon__i; /* icon structure */
......@@ -76,11 +94,9 @@ static wimp_i do_baricon(
char *spritename, int spritearea, baricon_clickproc proc, int L_or_R)
{
/* 13-Mar-90: IDJ added code to set icon size correctly */
sprite_info result;
os_regset r;
/* don't use sprite.c 'cos it's rubbish */
r.r[0] = 40; /* read sprite info */
if (spritearea != 0 && spritearea != 1) /* not system/wimp sprite pool */
r.r[0] += 256;
......@@ -138,12 +154,10 @@ static wimp_i do_baricon_textandsprite(char *spritename, char *text,
int bufflen, int spritearea, baricon_clickproc proc, int L_or_R)
{
/* 13-Mar-90: IDJ added code to set icon size correctly */
sprite_info result;
os_regset r;
wimpt_checkmode();
/* don't use sprite.c 'cos it's rubbish */
r.r[0] = 40; /* read sprite info */
if (spritearea != 0 && spritearea != 1) /* not system/wimp sprite pool */
r.r[0] += 256;
......
......@@ -12,31 +12,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/****************************************************************************
* This source file was written by Acorn Computers Limited. It is part of *
* the "cwimp" library for writing applications in C for RISC OS. It may be *
* used freely in the creation of programs for Archimedes. It should be *
* used with Acorn's C Compiler Release 2 or later. *
* *
* No support can be given to programmers using this code and, while we *
* believe that it is correct, no correspondence can be entered into *
* concerning behaviour or bugs. *
* *
* Upgrades of this code may or may not appear, and while every effort will *
* be made to keep such upgrades upwards compatible, no guarantees can be *
* given. *
***************************************************************************/
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/*
* Title : c.bbc
* Purpose: provides bbc-style graphics and mouse/keyboard control
* Version: 0.1
* 0.2 RCM all bbc_xxxx routines now return ->os_error
* 0.3 SKS tidied up. Fixed bbc_soundoff AGAIN (someone had UNfixed it)
* fixed bbc_adval to be useful.
* 12-Apr-89 IDJ Fixed header name
* 13-Mar-90 IDJ fixed bbc_vpos
* 08-May-91 ECN #ifndefed out unused ROM functions
* History: IDJ: 05-Feb-92: prepared for source release
*/
#define BOOL int
......@@ -141,7 +134,7 @@ int bbc_modevar (int mode, int varno)
{ int flags, result;
if (_swix (OS_ReadModeVariable, _IN (0) | _IN (1) | _OUT (2) | _OUT (_FLAGS),
if (_swix (OS_ReadModeVariable, _INR(0,1)|_OUT(2)| _OUT(_FLAGS),
mode, varno, &result, &flags) != NULL || (flags & _C) != 0)
return -1;
......@@ -552,7 +545,7 @@ int bbc_adval(int x)
int dmy;
os_byte(0x80, &x, &dmy);
return x;
};
}
}
#endif
......
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* © Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -15,9 +43,8 @@
/*
* Title: colourmenu.c
* Purpose: create a wimp colour setting menu
* Status: system_independent
* History:
* 22-Sep-88: DAHE: created (based loosely on some old ArcDraw codes)
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#define BOOL int
......@@ -41,7 +68,8 @@
*/
menu colourmenu_make(char *title, BOOL includeNone)
{ menu m;
{
menu m;
wimp_menuhdr *dptr;
wimp_menuitem *iptr; /* Very mode dependent */
wimp_palettestr palette;
......
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -15,17 +43,11 @@
/*
* Title: colourtran.c
* Purpose: C interface to the ColourTrans SWIs
* Author: IDJ
* History:
* 10-Apr-89 IDJ Created
* 08-May-91 ECN #ifndefed out unused functions
* 17-Jun-91: IDJ: return_GCOLformode put back for paint
* 28-Oct-94: AMcC: Include colourtran_return_colourformode in ROM (for Paint)
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#ifndef __stddef_h
#include <stddef.h>
#endif
#include "colourtran.h"
#include "os.h"
#include "wimp.h"
......
......@@ -12,8 +12,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* ->c.wimpextra */
/* Extra routine for common wimpish things */
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/*
* Title: coords.c
* Purpose: mapping of screen/window coords
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#include "h.wimp"
......@@ -69,111 +87,6 @@ void coords_point_toworkarea(coords_pointstr *point, coords_cvtstr *cvt)
point->y = coords_y_toworkarea(point->y, cvt);
}
#if FALSE
/*
Function : point_to_workarea_by_handle
Purpose : convert a point from screen to workarea coordinates
Parameters : IN/OUT: pointer to point
window handle
Returns : void
Description :
*/
void point_to_workarea_by_handle(pointstr *point, wimp_w handle)
{ wimp_wstate windowState;
/* Read window state */
wimpt_complain(wimp_get_wind_state(handle, &windowState));
/* Do conversion */
point->x = x_to_workarea(point->x, Convert(windowState.o));
point->y = y_to_workarea(point->y, Convert(windowState.o));
}
/*
Function : box_to_workarea_by_handle
Purpose : convert a box from screen to workarea given window handle
Parameters : pointer to box
window handle
Returns : void
Description :
*/
void box_to_workarea_by_handle(wimp_box *box, wimp_w handle)
{ wimp_wstate windowState;
/* Read window state */
wimpt_complain(wimp_get_wind_state(handle, &windowState));
/* Do conversion */
box_to_workarea(box, Convert(windowState.o));
}
/*----------------------- Mode and palette routines -------------------------*/
/*
Data Group : static mode and palette data
Description :
*/
/* Data block for recording the palette - set up on a mode or palette change */
static wimp_palettestr palette;
static struct
{
int ncolours;
int xEig;
int yEig;
} currentmode;
static int modevarlist[] = { bbc_NColour, bbc_XEigFactor, bbc_YEigFactor, -1};
/*
Function : cache_modeinfo
Purpose : note mode and palette dependent values
Parameters : void
Returns : void
Description : call this on a mode or palette change.
*/
void cache_modeinfo(void)
{
wimp_readpalette(&palette);
bbc_vduvars(modevarlist, (int *)&currentmode);
}
/*
Function : displ_gcol
Purpose : set the graphics colour from a wimp colour value
Parameters : gcol action
plot colour
background colour
Returns : void
Description : sets the correct gcol and tint
Mode info must have been cached by a call to cache_modeinfo.
The background colour is usually 0, for the window bg.
*/
void displ_gcol(int action, int plotcol, int bgcolour)
{
int displcolour;
if (action == 3)
displcolour = palette.c[bgcolour].bytes.gcol^palette.c[plotcol].bytes.gcol;
else
displcolour = palette.c[plotcol].bytes.gcol;
if (currentmode.ncolours > 16)
{
bbc_gcol(action, displcolour >> 2);
bbc_tint(2, displcolour & 0xff);
}
else
{
bbc_gcol(action, displcolour);
}
}
#endif
/*----------------------------- Miscellanea ---------------------------------*/
/*
Function : within_box
......@@ -259,19 +172,3 @@ BOOL coords_boxesoverlap(wimp_box *box1, wimp_box *box2)
return (box1->x0 <= box2->x1 && box1->y0 <= box2->y1
&& box1->x1 >= box2->x0 && box1->y1 >= box2->y0);
}
#if FALSE
/*
Function : xPixToOS/yPixToOS
Purpose : convert an x/y coordinate from pixels to OS units
Parameters : x/y value in pixels
Returns : x/y value in OS units
Notes : mode info must have been cached
*/
int xPixToOS(int x)
{ return(x * (1 << currentmode.xEig)); }
int yPixToOS(int y)
{ return(y * (1 << currentmode.yEig)); }
#endif
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/************************************************************************/
/* Acorn Computers Ltd, 1992. */
/* */
/* This file forms part of an unsupported source release of RISC_OSLib. */
/* */
/* It may be freely used to create executable images for saleable */
/* products but cannot be sold in source form or as an object library */
/* without the prior written consent of Acorn Computers Ltd. */
/* */
/* If this file is re-distributed (even if modified) it should retain */
/* this copyright notice. */
/* */
/************************************************************************/
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -14,13 +42,8 @@
*/
/* Title: > c.dbox
* Purpose: System-independent dialog boxes.
* History: 5-Feb-90: IDJ: split off dbox_fillin_loop, to allow calling from dbox_fillin
* and dbox_fillin_fixedcaret - the latter function doesn't move
* caret to end of first writeable icon. Users of dbox_fillin
* won't see any difference
* 18-Mar-91: IDJ: bug fix to dbox_fillin_fixedcaret (and a slight tidy to dbox_fillin)
* 08-May-91: ECN: #ifndefed out unused ROM functions
* 11-Jun-91: IDJ: fixed grabbing of key events by useless dboxes
* History: IDJ: 05-Feb-92: prepared for source release
*
*/
#define BOOL int
......@@ -130,7 +153,9 @@ static dbox dbox__fromtemplate(template *from)
static void dbox__dispose(dbox d)
{
if (d->workspacesize != 0) {free(d->workspace);};
if (d->workspacesize != 0) {
free(d->workspace);
}
free(d);
}
......@@ -138,7 +163,9 @@ static void dbox__dodispose(dbox d)
{
win_register_event_handler(d->w, 0, 0);
event_attachmenu(d->w, 0, 0, 0);
if (d->showing) {win_activedec();};
if (d->showing) {
win_activedec();
}
wimpt_noerr(wimp_delete_wind(d->w));
dbox__dispose(d);
}
......@@ -165,8 +192,8 @@ found. */
if ((i->flags & mask) == settings) {
tracef1("Found icon %i.\n", *j);
return(1);
};
};
}
}
return(0);
}
......@@ -179,8 +206,8 @@ static int dbox__findiconbefore(dbox d,
if ((i->flags & mask) == settings) {
tracef1("Found icon %i.\n", *j);
return(1);
};
};
}
}
return(0);
}
......@@ -228,7 +255,7 @@ static dbox_fieldtype dbox__iconfieldtype(wimp_icon *i)
return(dbox_FINPUT);
default:
return(dbox_FOUTPUT);
};
}
}
static BOOL dbox__has_action_button(dbox d)
......@@ -248,7 +275,7 @@ static BOOL dbox__has_action_button(dbox d)
}
static int dbox__min(int a, int b) {if (a<b) {return(a);} else {return(b);};}
static int dbox__min(int a, int b) {if (a<b) {return(a);} else {return(b);}}
void dbox_fadefield (dbox d, dbox_field f)
......@@ -289,7 +316,7 @@ void dbox_setfield(dbox d, dbox_field f, char *value)
{
(void) memcpy(&i->data.text[0], value, 12);
i->data.text[11] = 0;
};
}
/* ensure that the caret moves correctly if it's in this icon */
......@@ -309,7 +336,7 @@ void dbox_setfield(dbox d, dbox_field f, char *value)
/* prod it, to cause redraw */
wimpt_noerr(wimp_set_icon_state(d->w, dbox__fieldtoicon(f), 0, 0));
};
}
}
void dbox_getfield(dbox d, dbox_field f, char *buffer, int size)
......@@ -322,17 +349,17 @@ void dbox_getfield(dbox d, dbox_field f, char *buffer, int size)
/* Allowed, returns "". */
} else {
if ((i->flags & wimp_INDIRECT) != 0) {
while (i->data.indirecttext.buffer[j] >= 32) {j++;};
while (i->data.indirecttext.buffer[j] >= 32) {j++;}
from = i->data.indirecttext.buffer;
} else {
while (i->data.text[j] >= 32 && j < 11) {j++;};
while (i->data.text[j] >= 32 && j < 11) {j++;}
from = &i->data.text[0];
};
if (j > size) {j = size;};
}
if (j > size) {j = size;}
tracef3("GetField copies %i from %i to %i.\n",
j, (int) from, (int) buffer);
(void) memcpy(buffer, from, j);
};
}
buffer[j] = 0;
tracef1("GetField returns %s.\n", (int) buffer);
}
......@@ -364,7 +391,7 @@ void dbox_setnumeric(dbox d, dbox_field f, int n)
default:
sprintf(a, "%i", n);
dbox_setfield((dbox) d, f, a);