Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1085 → Rev 1315

/demos/tags/rel_0_3/fsdemo/xread.c
18,6 → 18,7
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
 
#include <assert.h>
 
204,8 → 205,11
nv=n;
n=filledspace(ptr)/objsize;
if (n==0) {
struct timespec delay;
delay.tv_sec=0;
delay.tv_nsec=15000000;
n=nv;
task_delay(15000);
nanosleep(&delay, 0);
goto REDO;
return 0;
}
/demos/tags/rel_0_3/fsdemo/mplay.c
36,11 → 36,11
*/
 
/*
* CVS : $Id: mplay.c,v 1.1.1.1 2002-09-02 09:37:41 pj Exp $
* CVS : $Id: mplay.c,v 1.2 2002-11-11 08:17:31 pj Exp $
*
* File: $File$
* Revision: $Revision: 1.1.1.1 $
* Last update: $Date: 2002-09-02 09:37:41 $
* Revision: $Revision: 1.2 $
* Last update: $Date: 2002-11-11 08:17:31 $
*/
 
#include "config.h"
66,6 → 66,7
 
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
 
#include "gclock.h"
#include "gvideo.h"
365,14 → 366,22
if (grp>0) group_activate(grp);
 
esc=0;
while (!esc) {
if (keyb_getcode(&k,NON_BLOCK)) {
if(k.ascii==13) esc=1;
else if (k.ascii=='a') task_activate(ph1);
else if (k.ascii=='s') task_activate(ph2);
else if (k.ascii=='d') task_activate(ph3);
 
{
struct timespec delay;
 
delay.tv_sec = MAINSLEEP/1000000;
delay.tv_nsec = (MAINSLEEP%1000000)*1000;
 
while (!esc) {
if (keyb_getcode(&k,NON_BLOCK)) {
if(k.ascii==13) esc=1;
else if (k.ascii=='a') task_activate(ph1);
else if (k.ascii=='s') task_activate(ph2);
else if (k.ascii=='d') task_activate(ph3);
}
nanosleep(&delay, NULL);
}
task_delay(MAINSLEEP);
}
 
#ifndef NOGRX