| 1 | /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2, or (at your option) |
| 6 | * any later version. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this software; see the file COPYING. If not, write to |
| 15 | * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
| 16 | * Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * As a special exception, the Free Software Foundation gives permission |
| 19 | * for additional uses of the text contained in its release of GUILE. |
| 20 | * |
| 21 | * The exception is that, if you link the GUILE library with other files |
| 22 | * to produce an executable, this does not by itself cause the |
| 23 | * resulting executable to be covered by the GNU General Public License. |
| 24 | * Your use of that executable is in no way restricted on account of |
| 25 | * linking the GUILE library code into it. |
| 26 | * |
| 27 | * This exception does not however invalidate any other reasons why |
| 28 | * the executable file might be covered by the GNU General Public License. |
| 29 | * |
| 30 | * This exception applies only to the code released by the |
| 31 | * Free Software Foundation under the name GUILE. If you copy |
| 32 | * code from other Free Software Foundation releases into a copy of |
| 33 | * GUILE, as the General Public License permits, the exception does |
| 34 | * not apply to the code that you add in this way. To avoid misleading |
| 35 | * anyone as to the status of such modified files, you must delete |
| 36 | * this exception notice from them. |
| 37 | * |
| 38 | * If you write modifications of your own for GUILE, it is your choice |
| 39 | * whether to permit this exception to apply to your modifications. |
| 40 | * If you do not wish that, delete this exception notice. */ |
| 41 | \f |
| 42 | |
| 43 | |
| 44 | #include <stdio.h> |
| 45 | #include "_scm.h" |
| 46 | #include "genio.h" |
| 47 | #include "read.h" |
| 48 | #include "fports.h" |
| 49 | #include "unif.h" |
| 50 | #include "chars.h" |
| 51 | |
| 52 | #include "ioext.h" |
| 53 | |
| 54 | #ifdef HAVE_STRING_H |
| 55 | #include <string.h> |
| 56 | #endif |
| 57 | #ifdef HAVE_UNISTD_H |
| 58 | #include <unistd.h> |
| 59 | #endif |
| 60 | \f |
| 61 | |
| 62 | SCM_PROC (s_read_delimited_x, "%read-delimited!", 3, 3, 0, scm_read_delimited_x); |
| 63 | |
| 64 | SCM |
| 65 | scm_read_delimited_x (delims, buf, gobble, port, start, end) |
| 66 | SCM delims; |
| 67 | SCM buf; |
| 68 | SCM gobble; |
| 69 | SCM port; |
| 70 | SCM start; |
| 71 | SCM end; |
| 72 | { |
| 73 | long j; |
| 74 | char *cbuf; |
| 75 | long cstart; |
| 76 | long cend; |
| 77 | int c; |
| 78 | char *cdelims; |
| 79 | int num_delims; |
| 80 | |
| 81 | SCM_ASSERT (SCM_NIMP (delims) && SCM_ROSTRINGP (delims), |
| 82 | delims, SCM_ARG1, s_read_delimited_x); |
| 83 | cdelims = SCM_ROCHARS (delims); |
| 84 | num_delims = SCM_ROLENGTH (delims); |
| 85 | SCM_ASSERT (SCM_NIMP (buf) && SCM_STRINGP (buf), |
| 86 | buf, SCM_ARG2, s_read_delimited_x); |
| 87 | cbuf = SCM_CHARS (buf); |
| 88 | cend = SCM_LENGTH (buf); |
| 89 | if (SCM_UNBNDP (port)) |
| 90 | port = scm_cur_inp; |
| 91 | else |
| 92 | { |
| 93 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPINPORTP (port), |
| 94 | port, SCM_ARG1, s_read_delimited_x); |
| 95 | } |
| 96 | |
| 97 | if (SCM_UNBNDP (start)) |
| 98 | cstart = 0; |
| 99 | else |
| 100 | { |
| 101 | cstart = scm_num2long (start, |
| 102 | (char *) SCM_ARG5, s_read_delimited_x); |
| 103 | if (cstart < 0 || cstart >= cend) |
| 104 | scm_out_of_range (s_read_delimited_x, start); |
| 105 | |
| 106 | if (!SCM_UNBNDP (end)) |
| 107 | { |
| 108 | long tend = scm_num2long (end, (char *) SCM_ARG6, |
| 109 | s_read_delimited_x); |
| 110 | if (tend <= cstart || tend > cend) |
| 111 | scm_out_of_range (s_read_delimited_x, end); |
| 112 | cend = tend; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | for (j = cstart; j < cend; j++) |
| 117 | { |
| 118 | int k; |
| 119 | |
| 120 | c = scm_gen_getc (port); |
| 121 | for (k = 0; k < num_delims; k++) |
| 122 | { |
| 123 | if (cdelims[k] == c) |
| 124 | { |
| 125 | if (SCM_FALSEP (gobble)) |
| 126 | scm_gen_ungetc (c, port); |
| 127 | |
| 128 | return scm_cons (SCM_MAKICHR (c), |
| 129 | scm_long2num (j - cstart)); |
| 130 | } |
| 131 | } |
| 132 | if (c == EOF) |
| 133 | return scm_cons (SCM_EOF_VAL, |
| 134 | scm_long2num (j - cstart)); |
| 135 | |
| 136 | cbuf[j] = c; |
| 137 | } |
| 138 | return scm_cons (SCM_BOOL_F, scm_long2num (j - cstart)); |
| 139 | } |
| 140 | |
| 141 | SCM_PROC (s_write_line, "write-line", 1, 1, 0, scm_write_line); |
| 142 | |
| 143 | SCM |
| 144 | scm_write_line (obj, port) |
| 145 | SCM obj; |
| 146 | SCM port; |
| 147 | { |
| 148 | scm_display (obj, port); |
| 149 | return scm_newline (port); |
| 150 | } |
| 151 | |
| 152 | SCM_PROC (s_ftell, "ftell", 1, 0, 0, scm_ftell); |
| 153 | |
| 154 | SCM |
| 155 | scm_ftell (port) |
| 156 | SCM port; |
| 157 | { |
| 158 | long pos; |
| 159 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_ftell); |
| 160 | SCM_SYSCALL (pos = ftell ((FILE *)SCM_STREAM (port))); |
| 161 | if (pos < 0) |
| 162 | scm_syserror (s_ftell); |
| 163 | if (pos > 0 && SCM_CRDYP (port)) |
| 164 | pos--; |
| 165 | return scm_long2num (pos); |
| 166 | } |
| 167 | |
| 168 | |
| 169 | |
| 170 | SCM_PROC (s_fseek, "fseek", 3, 0, 0, scm_fseek); |
| 171 | |
| 172 | SCM |
| 173 | scm_fseek (port, offset, whence) |
| 174 | SCM port; |
| 175 | SCM offset; |
| 176 | SCM whence; |
| 177 | { |
| 178 | int rv; |
| 179 | long loff; |
| 180 | |
| 181 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_fseek); |
| 182 | loff = scm_num2long (offset, (char *)SCM_ARG2, s_fseek); |
| 183 | SCM_ASSERT (SCM_INUMP (whence) && (SCM_INUM (whence) < 3) && (SCM_INUM (whence) >= 0), |
| 184 | whence, SCM_ARG3, s_fseek); |
| 185 | |
| 186 | SCM_CLRDY (port); /* Clear ungetted char */ |
| 187 | /* Values of whence are interned in scm_init_ioext. */ |
| 188 | rv = fseek ((FILE *)SCM_STREAM (port), loff, SCM_INUM (whence)); |
| 189 | if (rv != 0) |
| 190 | scm_syserror (s_fseek); |
| 191 | return SCM_UNSPECIFIED; |
| 192 | } |
| 193 | |
| 194 | |
| 195 | |
| 196 | SCM_PROC (s_freopen, "freopen", 3, 0, 0, scm_freopen); |
| 197 | |
| 198 | SCM |
| 199 | scm_freopen (filename, modes, port) |
| 200 | SCM filename; |
| 201 | SCM modes; |
| 202 | SCM port; |
| 203 | { |
| 204 | FILE *f; |
| 205 | SCM_ASSERT (SCM_NIMP (filename) && SCM_ROSTRINGP (filename), filename, |
| 206 | SCM_ARG1, s_freopen); |
| 207 | SCM_ASSERT (SCM_NIMP (modes) && SCM_ROSTRINGP (modes), modes, SCM_ARG2, |
| 208 | s_freopen); |
| 209 | |
| 210 | SCM_COERCE_SUBSTR (filename); |
| 211 | SCM_COERCE_SUBSTR (modes); |
| 212 | SCM_DEFER_INTS; |
| 213 | SCM_ASSERT (SCM_NIMP (port) && SCM_FPORTP (port), port, SCM_ARG3, s_freopen); |
| 214 | SCM_SYSCALL (f = freopen (SCM_ROCHARS (filename), SCM_ROCHARS (modes), |
| 215 | (FILE *)SCM_STREAM (port))); |
| 216 | if (!f) |
| 217 | { |
| 218 | SCM p; |
| 219 | p = port; |
| 220 | port = SCM_MAKINUM (errno); |
| 221 | SCM_SETAND_CAR (p, ~SCM_OPN); |
| 222 | scm_remove_from_port_table (p); |
| 223 | } |
| 224 | else |
| 225 | { |
| 226 | SCM_SETCAR (port, scm_tc16_fport | scm_mode_bits (SCM_ROCHARS (modes))); |
| 227 | SCM_SETSTREAM (port, (SCM)f); |
| 228 | SCM_SETCAR (port, scm_tc16_fport | scm_mode_bits (SCM_ROCHARS (modes))); |
| 229 | if (SCM_BUF0 & SCM_CAR (port)) |
| 230 | scm_setbuf0 (port); |
| 231 | } |
| 232 | SCM_ALLOW_INTS; |
| 233 | return port; |
| 234 | } |
| 235 | |
| 236 | |
| 237 | |
| 238 | SCM_PROC (s_duplicate_port, "duplicate-port", 2, 0, 0, scm_duplicate_port); |
| 239 | |
| 240 | SCM |
| 241 | scm_duplicate_port (oldpt, modes) |
| 242 | SCM oldpt; |
| 243 | SCM modes; |
| 244 | { |
| 245 | int oldfd; |
| 246 | int newfd; |
| 247 | FILE *f; |
| 248 | SCM newpt; |
| 249 | SCM_ASSERT (SCM_NIMP (oldpt) && SCM_OPPORTP (oldpt), oldpt, SCM_ARG1, |
| 250 | s_duplicate_port); |
| 251 | SCM_ASSERT (SCM_NIMP (modes) && SCM_ROSTRINGP (modes), modes, SCM_ARG2, |
| 252 | s_duplicate_port); |
| 253 | |
| 254 | SCM_COERCE_SUBSTR (modes); |
| 255 | SCM_NEWCELL (newpt); |
| 256 | SCM_DEFER_INTS; |
| 257 | oldfd = fileno ((FILE *)SCM_STREAM (oldpt)); |
| 258 | if (oldfd == -1) |
| 259 | scm_syserror (s_duplicate_port); |
| 260 | SCM_SYSCALL (newfd = dup (oldfd)); |
| 261 | if (newfd == -1) |
| 262 | scm_syserror (s_duplicate_port); |
| 263 | f = fdopen (newfd, SCM_ROCHARS (modes)); |
| 264 | if (!f) |
| 265 | { |
| 266 | SCM_SYSCALL (close (newfd)); |
| 267 | scm_syserror (s_duplicate_port); |
| 268 | } |
| 269 | { |
| 270 | struct scm_port_table * pt; |
| 271 | pt = scm_add_to_port_table (newpt); |
| 272 | SCM_SETPTAB_ENTRY (newpt, pt); |
| 273 | SCM_SETCAR (newpt, scm_tc16_fport | scm_mode_bits (SCM_ROCHARS (modes))); |
| 274 | SCM_SETSTREAM (newpt, (SCM)f); |
| 275 | if (SCM_BUF0 & SCM_CAR (newpt)) |
| 276 | scm_setbuf0 (newpt); |
| 277 | SCM_PTAB_ENTRY (newpt)->file_name = SCM_PTAB_ENTRY (oldpt)->file_name; |
| 278 | } |
| 279 | SCM_ALLOW_INTS; |
| 280 | return newpt; |
| 281 | } |
| 282 | |
| 283 | |
| 284 | |
| 285 | SCM_PROC (s_redirect_port, "redirect-port", 2, 0, 0, scm_redirect_port); |
| 286 | |
| 287 | SCM |
| 288 | scm_redirect_port (old, new) |
| 289 | SCM old; |
| 290 | SCM new; |
| 291 | { |
| 292 | int ans, oldfd, newfd; |
| 293 | |
| 294 | SCM_DEFER_INTS; |
| 295 | SCM_ASSERT (SCM_NIMP (old) && SCM_OPPORTP (old), old, SCM_ARG1, s_redirect_port); |
| 296 | SCM_ASSERT (SCM_NIMP (new) && SCM_OPPORTP (new), new, SCM_ARG2, s_redirect_port); |
| 297 | oldfd = fileno ((FILE *)SCM_STREAM (old)); |
| 298 | if (oldfd == -1) |
| 299 | scm_syserror (s_redirect_port); |
| 300 | newfd = fileno ((FILE *)SCM_STREAM (new)); |
| 301 | if (newfd == -1) |
| 302 | scm_syserror (s_redirect_port); |
| 303 | SCM_SYSCALL (ans = dup2 (oldfd, newfd)); |
| 304 | if (ans == -1) |
| 305 | scm_syserror (s_redirect_port); |
| 306 | SCM_ALLOW_INTS; |
| 307 | return SCM_UNSPECIFIED; |
| 308 | } |
| 309 | |
| 310 | SCM_PROC (s_primitive_dup, "primitive-dup", 1, 0, 0, scm_primitive_dup); |
| 311 | SCM |
| 312 | scm_primitive_dup (SCM fd_or_port) |
| 313 | { |
| 314 | int fd, newfd; |
| 315 | |
| 316 | SCM_DEFER_INTS; |
| 317 | if (SCM_INUMP (fd_or_port)) |
| 318 | fd = SCM_INUM (fd_or_port); |
| 319 | else |
| 320 | { |
| 321 | SCM_ASSERT (SCM_NIMP (fd_or_port) && SCM_OPPORTP (fd_or_port), |
| 322 | fd_or_port, SCM_ARG1, s_primitive_dup); |
| 323 | fd = fileno ((FILE *)SCM_STREAM (fd_or_port)); |
| 324 | if (fd == -1) |
| 325 | scm_syserror (s_primitive_dup); |
| 326 | } |
| 327 | SCM_SYSCALL (newfd = dup (fd)); |
| 328 | if (newfd == -1) |
| 329 | scm_syserror (s_primitive_dup); |
| 330 | SCM_ALLOW_INTS; |
| 331 | return SCM_MAKINUM (newfd); |
| 332 | } |
| 333 | |
| 334 | SCM_PROC (s_primitive_dup2, "primitive-dup2", 2, 0, 0, scm_primitive_dup2); |
| 335 | SCM |
| 336 | scm_primitive_dup2 (SCM fd_or_port, SCM fd) |
| 337 | { |
| 338 | int oldfd, newfd, rv; |
| 339 | |
| 340 | SCM_DEFER_INTS; |
| 341 | if (SCM_INUMP (fd_or_port)) |
| 342 | oldfd = SCM_INUM (fd_or_port); |
| 343 | else |
| 344 | { |
| 345 | SCM_ASSERT (SCM_NIMP (fd_or_port) && SCM_OPPORTP (fd_or_port), |
| 346 | fd_or_port, SCM_ARG1, s_primitive_dup2); |
| 347 | oldfd = fileno ((FILE *)SCM_STREAM (fd_or_port)); |
| 348 | if (oldfd == -1) |
| 349 | scm_syserror (s_primitive_dup2); |
| 350 | } |
| 351 | |
| 352 | SCM_ASSERT (SCM_INUMP (newfd), newfd, SCM_ARG2, s_primitive_dup2); |
| 353 | newfd = SCM_INUM (fd); |
| 354 | scm_evict_ports (newfd); /* see scsh manual. */ |
| 355 | SCM_SYSCALL (rv = dup2 (oldfd, newfd)); |
| 356 | if (rv == -1) |
| 357 | scm_syserror (s_primitive_dup2); |
| 358 | SCM_ALLOW_INTS; |
| 359 | return SCM_UNSPECIFIED; |
| 360 | } |
| 361 | |
| 362 | SCM_PROC (s_fileno, "fileno", 1, 0, 0, scm_fileno); |
| 363 | |
| 364 | SCM |
| 365 | scm_fileno (port) |
| 366 | SCM port; |
| 367 | { |
| 368 | int fd; |
| 369 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_fileno); |
| 370 | fd = fileno ((FILE *)SCM_STREAM (port)); |
| 371 | if (fd == -1) |
| 372 | scm_syserror (s_fileno); |
| 373 | return SCM_MAKINUM (fd); |
| 374 | } |
| 375 | |
| 376 | SCM_PROC (s_isatty, "isatty?", 1, 0, 0, scm_isatty_p); |
| 377 | |
| 378 | SCM |
| 379 | scm_isatty_p (port) |
| 380 | SCM port; |
| 381 | { |
| 382 | int rv; |
| 383 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_isatty); |
| 384 | rv = fileno ((FILE *)SCM_STREAM (port)); |
| 385 | if (rv == -1) |
| 386 | scm_syserror (s_isatty); |
| 387 | rv = isatty (rv); |
| 388 | return rv ? SCM_BOOL_T : SCM_BOOL_F; |
| 389 | } |
| 390 | |
| 391 | |
| 392 | |
| 393 | SCM_PROC (s_fdopen, "fdopen", 2, 0, 0, scm_fdopen); |
| 394 | |
| 395 | SCM |
| 396 | scm_fdopen (fdes, modes) |
| 397 | SCM fdes; |
| 398 | SCM modes; |
| 399 | { |
| 400 | FILE *f; |
| 401 | SCM port; |
| 402 | struct scm_port_table * pt; |
| 403 | |
| 404 | SCM_ASSERT (SCM_INUMP (fdes), fdes, SCM_ARG1, s_fdopen); |
| 405 | SCM_ASSERT (SCM_NIMP (modes) && SCM_ROSTRINGP (modes), modes, SCM_ARG2, |
| 406 | s_fdopen); |
| 407 | SCM_COERCE_SUBSTR (modes); |
| 408 | SCM_NEWCELL (port); |
| 409 | SCM_DEFER_INTS; |
| 410 | f = fdopen (SCM_INUM (fdes), SCM_ROCHARS (modes)); |
| 411 | if (f == NULL) |
| 412 | scm_syserror (s_fdopen); |
| 413 | pt = scm_add_to_port_table (port); |
| 414 | SCM_SETPTAB_ENTRY (port, pt); |
| 415 | SCM_SETCAR (port, scm_tc16_fport | scm_mode_bits (SCM_ROCHARS (modes))); |
| 416 | if (SCM_BUF0 & SCM_CAR (port)) |
| 417 | scm_setbuf0 (port); |
| 418 | SCM_SETSTREAM (port, (SCM)f); |
| 419 | SCM_ALLOW_INTS; |
| 420 | return port; |
| 421 | } |
| 422 | |
| 423 | |
| 424 | |
| 425 | /* Move a port's underlying file descriptor to a given value. |
| 426 | * Returns #f if fdes is already the given value. |
| 427 | * #t if fdes moved. |
| 428 | * MOVE->FDES is implemented in Scheme and calls this primitive. |
| 429 | */ |
| 430 | SCM_PROC (s_primitive_move_to_fdes, "primitive-move->fdes", 2, 0, 0, scm_primitive_move_to_fdes); |
| 431 | |
| 432 | SCM |
| 433 | scm_primitive_move_to_fdes (port, fd) |
| 434 | SCM port; |
| 435 | SCM fd; |
| 436 | { |
| 437 | FILE *stream; |
| 438 | int old_fd; |
| 439 | int new_fd; |
| 440 | int rv; |
| 441 | |
| 442 | SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_primitive_move_to_fdes); |
| 443 | SCM_ASSERT (SCM_INUMP (fd), fd, SCM_ARG2, s_primitive_move_to_fdes); |
| 444 | SCM_DEFER_INTS; |
| 445 | stream = (FILE *)SCM_STREAM (port); |
| 446 | old_fd = fileno (stream); |
| 447 | new_fd = SCM_INUM (fd); |
| 448 | if (old_fd == new_fd) |
| 449 | { |
| 450 | SCM_ALLOW_INTS; |
| 451 | return SCM_BOOL_F; |
| 452 | } |
| 453 | scm_evict_ports (new_fd); |
| 454 | rv = dup2 (old_fd, new_fd); |
| 455 | if (rv == -1) |
| 456 | scm_syserror (s_primitive_move_to_fdes); |
| 457 | scm_setfileno (stream, new_fd); |
| 458 | SCM_SYSCALL (close (old_fd)); |
| 459 | SCM_ALLOW_INTS; |
| 460 | return SCM_BOOL_T; |
| 461 | } |
| 462 | |
| 463 | #ifdef FD_SETTER |
| 464 | #define SET_FILE_FD_FIELD(F,D) ((F)->FD_SETTER = (D)) |
| 465 | #endif |
| 466 | |
| 467 | void |
| 468 | scm_setfileno (fs, fd) |
| 469 | FILE *fs; |
| 470 | int fd; |
| 471 | { |
| 472 | #ifdef SET_FILE_FD_FIELD |
| 473 | SET_FILE_FD_FIELD(fs, fd); |
| 474 | #else |
| 475 | scm_misc_error ("scm_setfileno", "Not fully implemented on this platform", |
| 476 | SCM_EOL); |
| 477 | #endif |
| 478 | } |
| 479 | |
| 480 | /* Return a list of ports using a given file descriptor. */ |
| 481 | SCM_PROC(s_fdes_to_ports, "fdes->ports", 1, 0, 0, scm_fdes_to_ports); |
| 482 | |
| 483 | SCM |
| 484 | scm_fdes_to_ports (fd) |
| 485 | SCM fd; |
| 486 | { |
| 487 | SCM result = SCM_EOL; |
| 488 | int int_fd; |
| 489 | int i; |
| 490 | |
| 491 | SCM_ASSERT (SCM_INUMP (fd), fd, SCM_ARG1, s_fdes_to_ports); |
| 492 | int_fd = SCM_INUM (fd); |
| 493 | |
| 494 | SCM_DEFER_INTS; |
| 495 | for (i = 0; i < scm_port_table_size; i++) |
| 496 | { |
| 497 | if (SCM_FPORTP (scm_port_table[i]->port) |
| 498 | && fileno ((FILE *)SCM_STREAM (scm_port_table[i]->port)) == int_fd) |
| 499 | result = scm_cons (scm_port_table[i]->port, result); |
| 500 | } |
| 501 | SCM_ALLOW_INTS; |
| 502 | return result; |
| 503 | } |
| 504 | |
| 505 | |
| 506 | void |
| 507 | scm_init_ioext () |
| 508 | { |
| 509 | /* fseek() symbols. */ |
| 510 | scm_sysintern ("SEEK_SET", SCM_MAKINUM (SEEK_SET)); |
| 511 | scm_sysintern ("SEEK_CUR", SCM_MAKINUM (SEEK_CUR)); |
| 512 | scm_sysintern ("SEEK_END", SCM_MAKINUM (SEEK_END)); |
| 513 | |
| 514 | #include "ioext.x" |
| 515 | } |
| 516 | |