whitespace cleanup
This commit is contained in:
parent
170f4c4350
commit
cf77faefc8
|
@ -1405,7 +1405,6 @@ Mon Sep 24 17:41:03 2001 Christopher Faylor <cgf@redhat.com>
|
||||||
appropriate.
|
appropriate.
|
||||||
* syscalls.cc (_open): Call set_names in build_fhandler.
|
* syscalls.cc (_open): Call set_names in build_fhandler.
|
||||||
|
|
||||||
|
|
||||||
Sun Sep 23 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
Sun Sep 23 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc (_open): Set name in fhandler object after successful
|
* syscalls.cc (_open): Set name in fhandler object after successful
|
||||||
|
|
|
@ -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
|
includes a pointer to the actual fhandler that operates this specific file. All
|
||||||
file-oriented system calls then operate off this basic structure.
|
file-oriented system calls then operate off this basic structure.
|
||||||
|
|
||||||
For example, lets example lseek ().
|
For example, lets examine lseek ().
|
||||||
|
|
||||||
extern "C" off_t
|
extern "C" off_t
|
||||||
_lseek (int fd, off_t pos, int dir)
|
_lseek (int fd, off_t pos, int dir)
|
||||||
|
|
|
@ -408,7 +408,7 @@ struct sysex_info {
|
||||||
#define CTRL_EXPRESSION 253 /* Obsolete */
|
#define CTRL_EXPRESSION 253 /* Obsolete */
|
||||||
#define CTRL_MAIN_VOLUME 252 /* Obsolete */
|
#define CTRL_MAIN_VOLUME 252 /* Obsolete */
|
||||||
#define SEQ_BALANCE 11
|
#define SEQ_BALANCE 11
|
||||||
#define SEQ_VOLMODE 12
|
#define SEQ_VOLMODE 12
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Volume mode decides how volumes are used
|
* Volume mode decides how volumes are used
|
||||||
|
@ -480,7 +480,7 @@ struct synth_info { /* Read only */
|
||||||
|
|
||||||
#define SAMPLE_TYPE_BASIC 0x10
|
#define SAMPLE_TYPE_BASIC 0x10
|
||||||
#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
|
#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
|
||||||
#define SAMPLE_TYPE_WAVEFRONT 0x11
|
#define SAMPLE_TYPE_WAVEFRONT 0x11
|
||||||
|
|
||||||
int perc_mode; /* No longer supported */
|
int perc_mode; /* No longer supported */
|
||||||
int nr_voices;
|
int nr_voices;
|
||||||
|
@ -696,7 +696,7 @@ typedef struct copr_msg {
|
||||||
unsigned char data[4000];
|
unsigned char data[4000];
|
||||||
} copr_msg;
|
} 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_LOAD _SIOWR('C', 1, copr_buffer)
|
||||||
#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
|
#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
|
||||||
#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
|
#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
|
||||||
|
|
|
@ -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 ()
|
|
||||||
{
|
|
||||||
}
|
|
Loading…
Reference in New Issue