~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to scipy/sandbox/xplt/src/play/unix/ugetc.h

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ugetc.h -- $Id: ugetc.h 685 2003-03-08 15:26:51Z travo $
 
3
 * play interface for non-event-driven programs
 
4
 * -- incompatible with p_stdinit/p_stdout functions
 
5
 *
 
6
 * Copyright (c) 1998.  See accompanying LEGAL file for details.
 
7
 */
 
8
 
 
9
/* assumes <stdio.h> has been included */
 
10
 
 
11
#include "extern_c.h"
 
12
 
 
13
/* non-play main programs may be able to use these as drop-in
 
14
 *   replacements for getc and/or fgets in order to use gist
 
15
 * - in particular, u_getc can be the readline rl_getc_function
 
16
 * - u_waitfor and u_wait_stdin return 0 if input available
 
17
 * - such programs must also define u_abort_hook as appropriate
 
18
 * - the code may call u_pending_events() to handle all pending
 
19
 *   events and expired alarms without blocking */
 
20
extern int u_getc(FILE *stream);
 
21
extern char *u_fgets(char *s, int size, FILE *stream);
 
22
extern int u_waitfor(FILE *stream);
 
23
 
 
24
/* call p_pending_events() to handle all pending
 
25
 *   events and expired alarms without blocking
 
26
 * call p_wait_while to set a flag and wait for play graphics events
 
27
 *   until flag is reset to zero
 
28
 * call p_xhandler to set abort_hook and on_exception routines
 
29
 *   a less obtrusive alternative to p_handler */
 
30
extern void p_pending_events(void);
 
31
extern void p_wait_while(int *flag);
 
32
extern void p_xhandler(void (*abort_hook)(void),
 
33
                       void (*on_exception)(int signal, char *errmsg));
 
34
extern int p_wait_stdin(void);
 
35
 
 
36
END_EXTERN_C