whitespace cleanup

This commit is contained in:
Christopher Faylor 2001-12-10 03:35:54 +00:00
parent 170f4c4350
commit cf77faefc8
7 changed files with 19 additions and 185 deletions

View File

@ -724,7 +724,7 @@ Sun Oct 21 19:04:37 2001 Alexander Gottwald <ago@informatik.tu-chemnitz.de>
* include/cygwin/mtio.h: Define DEFTAPE.
(struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
* include/cygwin/version.h: Bump API minor version to 47.
2001-10-16 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::fork_fixup): Guard against compiler
@ -1404,8 +1404,7 @@ Mon Sep 24 17:41:03 2001 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::build_fhandler): Fill out set_names here, if
appropriate.
* syscalls.cc (_open): Call set_names in build_fhandler.
Sun Sep 23 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_open): Set name in fhandler object after successful
@ -2363,7 +2362,7 @@ Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>
* thread.cc (verifyable_object_isvalid): Don't validate
PTHREAD_MUTEX_INITIALIZER pointer as it will cause an exception
in IsBadWritePtr() when running GDB.
Wed 25 Jul 2001 23:46:00 Corinna Vinschen <corinna@vinschen.de>
* localtime.c: Changed whole file to become C++ clean. Rename to

View File

@ -129,7 +129,7 @@ DLL_OFILES:=assert.o autoload.o cygheap.o dcrt0.o debug.o delqueue.o dir.o \
shortcut.o signal.o sigproc.o smallprint.o spawn.o strace.o strsep.o \
sync.o syscalls.o sysconf.o syslog.o termios.o thread.o times.o tty.o \
uinfo.o uname.o wait.o wincap.o window.o \
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
GMON_OFILES:= gmon.o mcount.o profil.o

View File

@ -107,5 +107,5 @@ SECTIONS
{
__system_dlls__ = ABSOLUTE(.) ;
__cygheap_start = ABSOLUTE(.) ;
}
}
}

View File

@ -18,7 +18,7 @@ When a file is opened - not necesarily via open() a fd is assigned to it. The fd
includes a pointer to the actual fhandler that operates this specific file. All
file-oriented system calls then operate off this basic structure.
For example, lets example lseek ().
For example, lets examine lseek ().
extern "C" off_t
_lseek (int fd, off_t pos, int dir)
@ -51,7 +51,7 @@ The sigframe thisframe (mainthread); is signal related - see
The if, else if, else tests (in order)
* the validity of the dir parameter,
* is the fd being passed actually open? (cannot seek on a closed fd)
* call the lseek virtual function in the associated fhandler.
* call the lseek virtual function in the associated fhandler.
So as you can see, there is no code that attempts to understand the nature of
the fhandler.
@ -61,5 +61,5 @@ inheritable cross-process need to implement fixup-after-fork and recreate those
objects. HANDLES can be inherited, but memory mapped regions (for example)
cannot.
For an example step-by-step to create a new fhandler, see
For an example step-by-step to create a new fhandler, see
../doc/fhandler-tut.txt

View File

@ -53,7 +53,7 @@ rem to sleep for x milliseconds at startup
set CYGWIN_SLEEP=20000
c:\some\path\bad_program.exe some parameters
===================================
Now, run program_wrapper.cmd. It should print running program pid.
After starting program_wrapper.cmd you've got 20 seconds to open another
window, cd to c:\cygdeb in it, run gdb there and in gdb prompt type

View File

@ -112,7 +112,7 @@
#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
/* this should be _SIORW, but stdio got there first */
#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
#define _SIOC_DIR(x) (x & 0xf0000000)
#define _SIOC_NONE SIOC_VOID
#define _SIOC_READ SIOC_OUT
@ -272,14 +272,14 @@ struct patch_info {
unsigned char tremolo_sweep;
unsigned char tremolo_rate;
unsigned char tremolo_depth;
unsigned char vibrato_sweep;
unsigned char vibrato_rate;
unsigned char vibrato_depth;
int scale_frequency;
unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */
int volume;
int fractions;
int reserved1;
@ -408,7 +408,7 @@ struct sysex_info {
#define CTRL_EXPRESSION 253 /* Obsolete */
#define CTRL_MAIN_VOLUME 252 /* Obsolete */
#define SEQ_BALANCE 11
#define SEQ_VOLMODE 12
#define SEQ_VOLMODE 12
/*
* Volume mode decides how volumes are used
@ -438,7 +438,7 @@ struct sysex_info {
* When a SEQ_FULLSIZE message is written to the device, it must
* be written using exactly one write() call. Other events cannot
* be mixed to the same write.
*
*
* For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the
* /dev/sequencer. Don't write other data together with the instrument structure
* Set the key field of the structure to FM_PATCH. The device field is used to
@ -480,13 +480,13 @@ struct synth_info { /* Read only */
#define SAMPLE_TYPE_BASIC 0x10
#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
#define SAMPLE_TYPE_WAVEFRONT 0x11
#define SAMPLE_TYPE_WAVEFRONT 0x11
int perc_mode; /* No longer supported */
int nr_voices;
int nr_drums; /* Obsolete field */
int instr_bank_size;
unsigned int capabilities;
unsigned int capabilities;
#define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */
#define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */
#define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */
@ -687,7 +687,7 @@ typedef struct copr_debug_buf {
int command; /* Used internally. Set to 0 */
int parm1;
int parm2;
int flags;
int flags;
int len; /* Length of data in bytes */
} copr_debug_buf;
@ -696,7 +696,7 @@ typedef struct copr_msg {
unsigned char data[4000];
} copr_msg;
#define SNDCTL_COPR_RESET _SIO ('C', 0)
#define SNDCTL_COPR_RESET _SIO ('C', 0)
#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
@ -710,7 +710,7 @@ typedef struct copr_msg {
/*********************************************
* IOCTL commands for /dev/mixer
*/
/*
* Mixer devices
*

View File

@ -1,165 +0,0 @@
/* test.c: misc Cygwin testing code
Copyright 1996, 1998, 1999, 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include <stdio.h>
#include <windows.h>
char a[] ="This is static data";
void
test1()
{
int depth = 0;
while (depth < 5)
{
int r;
printf ("about to fork %d\n", depth);
r = fork ();
if (r == 0)
{
int res;
depth++;
printf ("************Depth is %d\n", depth);
sleep (1);
}
else
{
printf ("This is the parent, quitting %d\n", depth);
sleep (1);
exit (1);
}
printf ("done loop, depth %d\n", depth);
}
}
#define N 10
int v[N];
startup ()
{
int i;
for (i = 0; i < N; i++)
{
int r;
fflush (stdout);
r = fork ();
if (r)
{
v[i] = r;
printf ("started %d, were'id %d\n", v[i], GetCurrentProcessId ());
fflush (stdout);
}
else
{
/* running the child, sleep a bit and exit. */
printf ("the fork said 0, were %d\n", GetCurrentProcessId ());
fflush (stdout);
sleep (2);
printf ("Running, and exiting %d\n", i);
fflush (stdout);
_exit (i + 0x30);
}
}
}
test2()
{
int i;
startup ();
sleep (1);
/* Wait for them one by one */
for (i = 0; i < N; i++)
{
int res;
waitpid (v[i], &res, 0);
printf ("Process %d gave res %x\n", v[i], res);
if (res != (0x30 + i) << 8)
printf ("***** BAD *** Process %d gave res %x\n", v[i], res);
}
}
test3()
{
int i;
startup ();
/* Wait for them all at the same time */
for (i = 0; i < N; i++)
{
int res;
wait (&res);
printf ("Got res %x\n", res);
}
}
test5()
{
char *c = strdup ("HI STEVE");
printf ("c is %s\n", c);
free (c);
}
int count;
main (int ac, char **av)
{
int r;
int done;
int test;
fprintf (stderr,"TO STDERR\n");
if (ac < 2) {
printf ("usage: test <n>\n");
exit (2);
}
test = atoi (av[1]);
printf ("%d %d Hi steve, about to start fork test %d %d.\n",getpid (), count++, test,
GetCurrentProcessId ());
fflush (stdout);
switch (test)
{
case 1:
test1();
break;
case 2:
test2();
break;
case 3:
test3();
break;
case 4:
SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED);
break;
case 5:
test5();
break;
}
}
free ()
{
printf ("MY FREE!\n");
}
char b[100000];
int i;
malloc (x)
{
char *r = b + i;
i += x;
return r;
}
realloc ()
{
}