1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
|
/*
* yeti_yhdf.i -
*
* Implement support for Yeti Hierarchical Data File.
*
*-----------------------------------------------------------------------------
*
* Copyright (C) 2005-2009 Eric ThiƩbaut <thiebaut@obs.univ-lyon1.fr>
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited liability.
*
* In this respect, the user's attention is drawn to the risks associated with
* loading, using, modifying and/or developing or reproducing the software by
* the user in light of its specific status of free software, that may mean
* that it is complicated to manipulate, and that also therefore means that it
* is reserved for developers and experienced professionals having in-depth
* computer knowledge. Users are therefore encouraged to load and test the
* software's suitability as regards their requirements in conditions enabling
* the security of their systems and/or data to be ensured and, more
* generally, to use and operate it in the same conditions as regards
* security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*
*-----------------------------------------------------------------------------
*
* $Id: yeti_yhdf.i,v 1.3 2009/12/16 09:45:14 eric Exp eric $
* $Log: yeti_yhdf.i,v $
* Revision 1.3 2009/12/16 09:45:14 eric
* - Change license to CeCILL-C.
* - Range objects can be saved into Yeti Hierarchical Data Files.
*
* Revision 1.2 2007/05/11 10:28:59 eric
* - This release implements version 2 of the format (old format still
* readable).
* - Yeti Hierarchical Data File (YHDF) can now store functions
* and symbolic links (by their names).
*
* Revision 1.1 2006/07/19 14:58:00 eric
* Initial revision
*/
local yhd_format;
/* DOCUMENT DESCRIPTION OF YHD FILE FORMAT
A YHD file consists in a header (256 bytes) followed by any number of
records (one record for each member of the saved hash_table object).
The file header is a 256 character array filled with a text string
padded with nulls:
YetiHD-VERSION (DATE)\n
ENCODING\n
COMMENT\n
where VERSION is the version number (an integer); DATE is the creation
date of the file (see Yorick built-in timestamp); ENCODING is a
human-readable array of 32 integers separated by commas and enclosed
in square brackets (ie.: [n1,n2,....,n32]); COMMENT is an optional
comment string.
All binary data of a YHD file is written following the ENCODING format
of the file.
The format of a record for an array member is as follow:
| Number Type Name Description
| -----------------------------------------------------------------------
| 1 long TYPE data type of record
| 1 long IDSIZE number of bytes in member identifier (may be 0)
| 1 long RANK number of dimensions, 0 if scalar/non-array
| RANK long DIMLIST dimension list (absent if RANK is 0)
| IDSIZE char IDENT identifier of record (see below)
| *special* DATA binary data of the record
TYPE is: <0 - string array 5 - float array 11 - range
| 0 - void 6 - double array
| 1 - char array 7 - complex array
| 2 - short array 8 - pointer array
| 3 - int array 9 - function
| 4 - long array 10 - symbolic link
For string array, TYPE is strictly less than zero and is minus the
number of characters needed to represent all elements of the array in
packed form (more on this below). Void objects are also used to
represent NULL pointer data -- this means that a NULL pointer element
takes 3*sizeof(long) bytes to be stored in the file, which may be an
issue if you use large pointer array sparsely filled with data.
IDENT is the full name of the member: it is a IDSIZE char array
where null characters are used to separate submember names and with
a final null. If IDSIZE=0, no IDENT is written.
Arrays of strings are written in packed form, every strings being
prefixed with '\1' (nil string) or '\2' (non-nil string) and suffixed
with '\0', hence:
| '\1' '\0' (2 bytes) for a nil string
| '\2' ... '\0' (2+LEN bytes) for a string of length LEN
this is needed to distinguish nil-string from "".
The data part of an arrays of pointers consists in anonymous records
(records with IDSIZE=0 and no IDENT) for each element of the array.
Non-array members such as functions and symbolic links have the
following record:
| Number Type Name Description
| -----------------------------------------------------------------------
| 1 long TYPE data type of record (9 or 10)
| 1 long IDSIZE number of bytes in member identifier (may be 0)
| 1 long LENGTH number of bytes for name
| IDSIZE char IDENT identifier of record (see above)
| LENGTH char NAME name of function or symbolic link
Range members have the following record:
| Number Type Name Description
| -----------------------------------------------------------------------
| 1 long TYPE data type of record (11)
| 1 long IDSIZE number of bytes in member identifier (may be 0)
| 1 long FLAGS flags of range
| IDSIZE char IDENT identifier of record (see above)
| 3 long RANGE MIN,MAX,STEP
*/
func yhd_save(filename, obj, keylist, .., comment=, encoding=, overwrite=)
/* DOCUMENT yhd_save, filename, obj;
-or- yhd_save, filename, obj, keylist, ...;
Save contents of hash object OBJ into the Yeti Hierarchical Data (YHD)
file FILENAME. If additional arguments are provided, they are the
names of members to save. The default is to save every member.
Keyword COMMENT can be used to store a (short) string comment in the
file header. The comment is truncated if it is too long (more than
about 130 bytes) to fit into the header. COMMENT must not contain
any DEL (octal 177) character.
Keyword ENCODING can be used to specify a particular binary data
format for the file; ENCODING can be the name of some known data
format (see get_encoding) or an array of 32 integers (see
set_primitives). The default is to use the native data format.
If keyword OVERWRITE is true and file FILENAME already exists, the new
file will (silently) overwrite the old one; othwerwise, file FILENAME
must not already exist (default behaviour).
SEE ALSO yhd_restore, yhd_info, yhd_check, yhd_format,
get_encoding, set_primitives, h_new. */
{
/* Declaration of variables that will be inherited by subroutines called
by this routine (not really necessary, but just to make this clear). */
local file, address, elsize;
/* Set some 'constants'. */
YHD_HEADER_SIZE = 256;
YHD_VERSION = 2; // version number
/* Get list of members to save. */
if (! is_hash(obj)) error, "expecting hash_table object";
while (more_args()) grow, keylist, next_arg();
if (! is_void(keylist) && structof(keylist) != string)
error, "invalid member list";
/* Check COMMENT string. */
if (is_void(comment)) comment = "";
else if (strmatch(comment, "\177")) error, "invalid character in COMMENT";
/* Create binary file with correct primitives and avoid log-file. */
if (! overwrite && open(filename,"r",1))
error, "file \"" + filename + "\" already exists";
logname = filename + "L";
remove_log = (open(logname, "r", 1) ? 0n : 1n);
file = open(filename, "wb");
if (remove_log) remove, logname;
if (is_void(encoding)) encoding = "native";
if (structof(encoding) == string) encoding = get_encoding(encoding);
install_encoding, file, encoding;
save, file, complex; /* install the definition of a complex */
/* Write header. */
ident = swrite(format="YetiHD-%d (%s)\n[%d",
YHD_VERSION, timestamp(), encoding(1));
for (i=2 ; i<=32 ; ++i) ident += swrite(format=",%d", encoding(i));
maxlen = YHD_HEADER_SIZE - 3 - strlen(ident);
if (strlen(comment) > maxlen) {
__yhd_warn, "too long comment get truncated";
comment = strpart(comment, 1:maxlen);
}
ident += swrite(format="]\n%s\n", comment);
len = strlen(ident);
(hdr = array(char, YHD_HEADER_SIZE))(1:len) = (*pointer(ident))(1:len);
address = 0;
_write, file, address, hdr;
address += YHD_HEADER_SIZE;
/* Build table of size of primary data types in file encoding. */
elsize = [encoding(1), encoding(4), encoding(7), encoding(10),
encoding(13), encoding(16), 2*encoding(16)];
/* Save members. */
__yhd_save_hash, obj, [], keylist;
}
func __yhd_save_member(data, ident)
{
/**/extern file, address, elsize;
long_size = elsize(4); /* sizeof(long) in file encoding */
idsize = numberof(ident);
if (is_array(data)) {
if ((s = structof(data)) == char) {
type = 1;
} else if (s == short) {
type = 2;
} else if (s == int) {
type = 3;
} else if (s == long) {
type = 4;
} else if (s == float) {
type = 5;
} else if (s == double) {
type = 6;
} else if (s == complex) {
type = 7;
} else if (s == pointer) {
type = 8;
} else if (s == string) {
/* For string arrays, TYPE is minus the number of character written
to the file. */
type = -(2*numberof(data) + sum(strlen(data)));
} else {
/* Unsupported array type. */
type = 0;
}
if (type) {
/* Write array record header. */
dimlist = dimsof(data);
number = numberof(data);
header = array(long, 2 + numberof(dimlist));
header(1) = type;
header(2) = idsize;
header(3:) = dimlist;
_write, file, address, header;
address += long_size*numberof(header);
if (idsize) {
_write, file, address, ident;
address += idsize;
}
/* Write data array. */
if (type < 0) {
/* string array */
nil = ['\1', '\0'];
for (i=1 ; i<=number ; ++i) {
c = *pointer(data(i));
n = numberof(c);
if (n) {
_write, file, address++, '\2';
_write, file, address, c;
address += n;
} else {
_write, file, address, nil;
address += 2;
}
}
} else if (type == 8) {
/* pointer data array */
for (i=1 ; i<=number ; ++i) {
__yhd_save_member, *data(i); /* no ident */
}
} else {
/* Numerical data array. */
_write, file, address, data;
address += elsize(type)*number;
}
return; /* end for supported array types */
}
}
/* Non-array types. */
if (is_hash(data)) {
__yhd_save_hash, data, ident;
} else if (is_func(data)) {
__yhd_save_named, 9, nameof(data);
} else if (is_symlink(data)) {
__yhd_save_named, 10, name_of_symlink(data);
} else if (is_range(data)) {
temp = parse_range(data);
header = array(long, 3);
header(1) = 11; /* type */
header(2) = idsize;
header(3) = temp(1); /* flags */
_write, file, address, header;
address += long_size*numberof(header);
if (idsize) {
_write, file, address, ident;
address += idsize;
}
_write, file, address, temp(2:4);
address += long_size*3;
} else {
/* Void or unsupported data type. */
if (! is_void(data)) {
if (idsize) {
/* hash table member */
__yhd_warn, "unsupported data type: ", typeof(data),
" for member \"", __yhd_member_name(ident),
"\" - replaced by void data";
} else {
/* element of a pointer array: save NULL pointer */
__yhd_warn, "unsupported data type: ", typeof(data),
" - replaced by NULL pointer element";
}
}
_write, file, address, long([0, idsize, 0]); /* type, idsize, rank */
address += 3*long_size;
if (idsize) {
_write, file, address, ident;
address += idsize;
}
}
}
func __yhd_save_hash(hash, prefix, keylist)
{
/* Recusively save all/some chidren of current member. */
if (is_void(keylist)) {
keylist = h_keys(hash);
if (is_array(keylist)) keylist = keylist(sort(keylist));
}
n = numberof(keylist);
for (i=1 ; i<=n ; ++i) {
key = keylist(i);
ident = prefix;
grow, ident, *pointer(key);
__yhd_save_member, h_get(hash, key), ident;
}
}
func __yhd_save_named(type, name)
{
/**/extern address, file, idsize, ident, long_size;
length = strlen(name);
header = array(long, 3);
header(1) = type;
header(2) = idsize;
header(3) = length;
_write, file, address, header;
address += long_size*numberof(header);
if (idsize) {
_write, file, address, ident;
address += idsize;
}
if (length) {
_write, file, address, strchar(name)(1:length);
address += length;
}
}
func yhd_check(file, &version, &date, &encoding, &comment)
/* DOCUMENT yhd_check(file);
-or- yhd_check(file, version, date, encoding, comment);
Return 1 (true) if FILE is a valid YHD file; otherwise return 0
(false). The nature of FILE is guessed by reading its header. Input
argument FILE can be a file name (scalar string) of a binary file
stream opened for reading; all other arguments are pure outputs and
may be omitted (if result is false, the contents of these outputs is
undetermined).
SEE ALSO yhd_info, yhd_save, yhd_restore, yhd_format. */
{
/* Read header array. */
YHD_HEADER_SIZE = 256;
if (structof(file) == string) file = open(file, "rb");
hdr = array(char, YHD_HEADER_SIZE);
if (_read(file, 0, hdr) != YHD_HEADER_SIZE) return 0n;
hdrstr = string(&hdr);
/* Parse header string (hopefully the DEL character (octal 177) is
not part of the comment string). */
comment = date = token = string();
encoding = array(long, 32);
version = 0;
if (sread(hdrstr, format="YetiHD-%d (%[^)])\n[%[^]]]\n%[^\177]",
version, date, token, comment) >= 3) {
/* Parse encoding array. */
value = 0;
for (i=1 ; i<32 ; ++i) {
if (sread(token, format="%d ,%[^]]", value, token) != 2) break;
encoding(i) = value;
}
if (i==32 && sread(token, format="%d %[^]]", value, token) == 1) {
/* Finalize encoding array and comment string. */
encoding(i) = value;
if (strpart(comment, 0:0) == "\n") comment = strpart(comment, :-1);
return 1n;
}
}
return 0n;
}
func yhd_info(file)
/* DOCUMENT yhd_info, file;
Print out some information about YHD file. FILE can be a file
name (scalar string) of a binary file stream opened for reading.
SEE ALSO yhd_check, yhd_restore, yhd_save, yhd_format. */
{
local version, date, encoding, comment;
if (! yhd_check(file, version, date, encoding, comment)) {
error, (structof(file) == string ? "\""+file+"\" is not a valid YHD file"
: "invalid YHD file");
}
write, format="%s:\n version = %d\n date = %s\n comment = %s\n",
(structof(file) == string ? file : "YHD file"), version, date, comment;
}
func yhd_restore(filename, keylist, ..)
/* DOCUMENT yhd_restore(filename);
-or- yhd_restore(filename, keylist, ...);
Restore and return hash table object saved in YHD file FILENAME. If
additional arguments are provided, they are the names of members to
restore. The default is to restore every member.
SEE ALSO yhd_check, yhd_info, yhd_save, yhd_format. */
{
/* Declaration of variables that will be inherited by subroutines called
by this routine (not really necessary, but just to make this clear). */
local file, address, elsize, type, dimlist, ident;
/* List of members to restore. */
while (more_args()) grow, keylist, next_arg();
if (! is_void(keylist) && structof(keylist) != string)
error, "invalid member list";
/* Open file, read header and set primitives. */
local version, date, encoding, comment;
file = open(filename, "rb");
if (! yhd_check(file, version, date, encoding, comment))
error, "\""+filename+"\" is not a valid YHD file";
if (version != 1 && version != 2) {
error, swrite(format="unsupported YHD file version: %d", version);
}
install_encoding, file, encoding;
save, file, complex; /* install the definition of a complex */
address = 256; /* header has already been read */
/* Build table of size of primary data types in file encoding. */
elsize = [encoding(1), encoding(4), encoding(7), encoding(10),
encoding(13), encoding(16), 2*encoding(16)];
/* Read contents of file. */
obj = h_new();
for (;;) {
/* Read header of next member. */
if (! __yhd_read_member_header(ident, type, dimlist))
return obj; /* normal end-of-file */
/* Skip member if not in KEYLIST. */
key = string(&ident);
if (! is_void(keylist) && noneof(keylist == key)) {
__yhd_restore_data, type, dimlist, 1;
continue;
}
/* Convert identifier to OWNER-KEY pair. */
owner = obj;
i = where(! ident);
n = numberof(i);
k2 = i(1);
for (j=2 ; j<=n ; ++j) {
if (h_has(owner, key)) {
owner = h_get(owner, key);
if (! is_hash(owner)) {
error, "inconsistent hierarchical member \""+
__yhd_member_name(ident)+"\"";
}
} else {
h_set, owner, key, (tmp = h_new());
owner = tmp;
}
k1 = k2 + 1;
k2 = i(j);
key = string(&ident(k1:k2));
}
if (h_has(owner, key)) __yhd_warn, "duplicate member \"",
__yhd_member_name(ident), "\" in YHD file";
h_set, owner, key, __yhd_restore_data(type, dimlist);
}
return obj
}
func __yhd_read_member_header(&ident, &type, &dimlist, pt)
{
/**/extern file, address, elsize;
/* Figure out if there is anything else to read. */
tmp = 'a';
if (! _read(file, address, tmp)) return 0; /* normal end-of-file */
/* Read record header */
long_size = elsize(4); /* sizeof(long) in file encoding */
char_size = elsize(1); /* sizeof(char) in file encoding */
tmp = __yhd_read(long_size, long, 3);
type = tmp(1);
idsize = tmp(2);
rank = tmp(3);
if (type != 0) {
if (rank < 0) error, "bad RANK in record header of YHD file";
if (type <= 8) {
dimlist = array(rank, rank+1);
if (rank) dimlist(2:) = __yhd_read(long_size, long, rank);
} else {
dimlist = rank; /* special */
}
} else {
/* Void object. */
if (rank != 0) error, "bad RANK in record header of YHD file";
dimlist = [];
}
if (pt) {
/* Element of pointer array: IDSIZE must be 0. */
if (idsize) error, "unexpected named member in YHD file";
} else {
if (idsize < 1) error, "unexpected anonymous member in YHD file";
ident = __yhd_read(char_size, char, idsize);
}
return 1;
}
func __yhd_restore_data(type, dimlist, skip)
{
/**/extern file, address, elsize;
if (type >= 1 && type <= 7) {
/* Numerical array data. */
size = elsize(type);
if (skip) {
n = numberof(dimlist);
for (i=2 ; i<=n ; ++i) size *= dimlist(i);
address += size;
return;
}
return __yhd_read(size, (type==1?char:
(type==2?short:
(type==3?int:
(type==4?long:
(type==5?float:
(type==6?double:complex)))))), dimlist);
}
if (type < 0) {
/* Restore string array. For string arrays, TYPE is minus the number
of character written to the file. */
char_size = elsize(1); /* sizeof(char) in file encoding */
count = -type;
if (skip) {
address += char_size*count;
return;
}
c = __yhd_read(char_size, char, count);
j = where(! c);
data = array(string, dimlist);
number = numberof(data);
if (numberof(j) != number) {
__yhd_warn, "bad string array in file (elements left empty)";
} else {
k1 = 1;
for (i=1 ; i<=number ; ++i) {
k2 = j(i);
if (c(k1) == '\2') data(i) = string(&c(k1+1:k2));
k1 = k2+1;
}
}
return data;
}
if (type == 8) {
/* Pointer array. */
local etype, edims; /* type and dimension list for every element */
ptr = array(pointer, dimlist);
number = numberof(ptr);
for (i=1 ; i<=number ; ++i) {
if (! __yhd_read_member_header(/*not needed*/, etype, edims, 1)) {
__yhd_warn, "short YHD file (unterminated pointer array)";
break;
}
tmp = __yhd_restore_data(etype, edims, skip);
//write, format="%3d:", i; info, tmp;
if (! skip && etype) ptr(i) = &tmp;
}
if (skip) return;
return ptr;
}
if (type == 9 || type == 10) {
length = dimlist; /* special */
if (skip) {
address += length;
return;
}
if (length <= 0) {
__yhd_warn, "unexpected lenght for function or symbolic link name";
return;
}
cbuf = array(char, length);
if (_read(file, address, cbuf) != length) {
error, "short YHD file (unterminated function or symbolic link)";
}
name = strchar(cbuf);
if (strlen(name) != length) {
error, "invalid name in function or symbolic link member";
}
address += length;
if (type == 9) {
/* function member */
if (symbol_exists(name)) {
value = symbol_def(name);
if (is_func(value)) {
return value;
}
}
__yhd_warn, ("function \"" + name +
"\" not defined (will be replaced by a symbolic link");
type = 10;
}
if (type == 10) {
/* symbolic link */
return symlink_to_name(name);
}
}
if (type == 11) {
long_size = elsize(4); /* sizeof(long) in file encoding */
if (skip) {
address += 3*long_size;
return;
}
temp = array(long, 4);
temp(1) = dimlist; /* special: "flags" in this context */
temp(2:4) = __yhd_read(long_size, long, 3);
return make_range(temp);
}
if (type) {
error, "invalid TYPE in record header of YHD file";
}
}
func __yhd_read(element_size, data_type, dimlist)
{
/**/extern file, address;
data = array(data_type, dimlist);
nbytes = element_size*numberof(data);
if (data_type != char) _read, file, address, data;
else if (_read(file, address, data) != nbytes) error, "short file";
address += nbytes;
return data;
}
func __yhd_warn(s, ..)
{
while (more_args()) s += next_arg();
write, format="WARNING - %s\n", s;
}
func __yhd_member_name(ident, separator)
{
name = string(&ident);
i = where(! ident);
if ((n = numberof(i)) >= 2) {
if (is_void(separator)) separator = ".";
k2 = i(1);
for (j=2 ; j<=n ; ++j) {
k1 = k2 + 1;
k2 = i(j);
name += separator + string(&ident(k1:k2));
}
}
return name;
}
func __yhd_insert_dim(dimlist, first_dim)
{
newlist = 0;
grow, newlist, dimlist;
newlist(1) = numberof(newlist)-1;
newlist(2) = first_dim;
return newlist;
}
/*
* Local Variables:
* mode: Yorick
* tab-width: 8
* c-basic-offset: 2
* indent-tabs-mode: nil
* fill-column: 78
* coding: utf-8
* End:
*/
|