Upload New File
This commit is contained in:
		
							
								
								
									
										73
									
								
								chained_functions.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								chained_functions.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
/*
 | 
			
		||||
 ============================================================================
 | 
			
		||||
 Name        : chained_list.c
 | 
			
		||||
 Author      : Lukas Heiligenbrunner
 | 
			
		||||
 Version     : 0.1.5 BETA
 | 
			
		||||
 Copyright   : My copyright
 | 
			
		||||
 Description : C programme to manage chained lists
 | 
			
		||||
 ============================================================================
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef CHAINED_FUNCTIONS_H
 | 
			
		||||
#define CHAINED_FUNCTIONS_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct messdaten
 | 
			
		||||
{
 | 
			
		||||
  struct messdaten * next;
 | 
			
		||||
  char sensorname[10];
 | 
			
		||||
  float messwert;
 | 
			
		||||
}messdaten;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* functon to insert the first element
 | 
			
		||||
 * in: firstelem; newelement
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: firstelem
 | 
			
		||||
 */
 | 
			
		||||
messdaten* insertFirst(messdaten* firstelem, messdaten* newelement);
 | 
			
		||||
 | 
			
		||||
/* functon to insert the last element
 | 
			
		||||
 * in: firstelem; newelement
 | 
			
		||||
 * out: newelement (why!?!)
 | 
			
		||||
 * changed: lastelement
 | 
			
		||||
 */
 | 
			
		||||
messdaten* insertLast(messdaten* firstelem, messdaten* newelement);
 | 
			
		||||
 | 
			
		||||
/* functon to insert the element on a specific position
 | 
			
		||||
 * in: firstelem; newelement; position
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: one more item in chained list...
 | 
			
		||||
 */
 | 
			
		||||
messdaten* insertPos(messdaten* firstelem, messdaten* newelement, int pos);
 | 
			
		||||
 | 
			
		||||
/* functon to delete the first element
 | 
			
		||||
 * in: firstelem;
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: firstelem
 | 
			
		||||
 */
 | 
			
		||||
messdaten* deleteFirst(messdaten* firstelem);
 | 
			
		||||
 | 
			
		||||
/* functon to delete the last element
 | 
			
		||||
 * in: firstelem
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: lastelement
 | 
			
		||||
 */
 | 
			
		||||
messdaten* deleteLast(messdaten* firstelem);
 | 
			
		||||
 | 
			
		||||
/* functon to delete the element of a specific element
 | 
			
		||||
 * in: firstelem; newelement
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: firstelem
 | 
			
		||||
 */
 | 
			
		||||
messdaten* deletePos(messdaten* firstelem, int pos);
 | 
			
		||||
 | 
			
		||||
/* functon to delete all the list elements
 | 
			
		||||
 * in: firstelem
 | 
			
		||||
 * out: newelement
 | 
			
		||||
 * changed: the whole list XD
 | 
			
		||||
 */
 | 
			
		||||
messdaten* deleteAll(messdaten* firstelem);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user