#include "emcmotlog.h"Include dependency graph for emcmotlog.c:

Go to the source code of this file.
Functions | |
| char | __attribute__ ((unused)) ident[]="$Id | 
| int | emcmotLogAdd (EMCMOT_LOG *log, EMCMOT_LOG_STRUCT val) | 
| int | emcmotLogGet (EMCMOT_LOG *log, EMCMOT_LOG_STRUCT *val) | 
      
  | 
  
| 
 
 Definition at line 21 of file emcmotlog.c. 00021                                                    : emcmotlog.c,v 1.2 2000/10/27 20:34:42 terrylr Exp $";
00022 
00023 int emcmotLogInit(EMCMOT_LOG *log, int type, int size)
00024 {
00025   log->type = type;
00026   log->size = size;
00027   log->start = 0;
00028   log->end = 0;
00029   log->howmany = 0;
00030 
00031   return 0;
00032 }
 | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 34 of file emcmotlog.c. 00035 {
00036   log->log[log->end] = val;
00037 
00038   log->end++;
00039   if (log->end >= log->size)
00040     {
00041       log->end = 0;
00042     }
00043 
00044   log->howmany++;
00045   if (log->howmany > log->size)
00046     {
00047       log->howmany = log->size;
00048       log->start++;
00049       if (log->start >= log->size)
00050         {
00051           log->start = 0;
00052         }
00053     }
00054 
00055   return 0;
00056 }
 | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 58 of file emcmotlog.c.  | 
  
1.2.11.1 written by Dimitri van Heesch,
 © 1997-2001