Changeset 1021 for trunk/flash.h


Ignore:
Timestamp:
05/31/10 00:24:40 (2 years ago)
Author:
hailfinger
Message:

Remove unneeded #include statements completely.

unistd.h was only used to get a definition of NULL in all files. Add our
own NULL #define and remove unistd.h from flash.h
stdio.h has no place in flash.h, it should be included only in files
which really need it.
Add #include statements in individual .c files where needed.

Replace a few printf with msg_* to eliminate the need for stdio.h.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Acked-by: Uwe Hermann <uwe@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/flash.h

    r1016 r1021  
    2525#define __FLASH_H__ 1 
    2626 
    27 #include <unistd.h> 
    2827#include <stdint.h> 
    29 #include <stdio.h> 
    3028#include "hwaccess.h" 
    3129#ifdef _WIN32 
     
    3331#undef min 
    3432#undef max 
     33#endif 
     34 
     35#ifndef NULL 
     36#define NULL ((void *) 0) 
    3537#endif 
    3638 
     
    557559extern const char *flashrom_version; 
    558560extern char *chip_to_probe; 
    559 #define printf_debug(x...) { if (verbose) printf(x); } 
    560561void map_flash_registers(struct flashchip *flash); 
    561562int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len); 
Note: See TracChangeset for help on using the changeset viewer.