/[gxemul]/trunk/src/include/misc.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/misc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:34 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: misc.h,v 1.251 2007/03/16 14:45:30 debug Exp $   *  $Id: misc.h,v 1.257 2007/06/15 17:12:31 debug Exp $
32   *   *
33   *  Misc. definitions for gxemul.   *  Misc. definitions for gxemul.
34   */   */
# Line 162  struct memory; Line 162  struct memory;
162  #define DEBUG_INDENTATION       4  #define DEBUG_INDENTATION       4
163    
164    
165    #ifdef HAVE___FUNCTION__
166    
167    #define FAILURE(error_msg)                                      {       \
168                    char where_msg[400];                                    \
169                    snprintf(where_msg, sizeof(where_msg),                  \
170                        "%s, line %i, function '%s'\n",                     \
171                        __FILE__, __LINE__, __FUNCTION__);                  \
172                    fprintf(stderr, "%s: %s\n", error_msg, where_msg);      \
173                    exit(1);                                                \
174            }
175    
176    #else
177    
178    #define FAILURE(error_msg)                                      {       \
179                    char where_msg[400];                                    \
180                    snprintf(where_msg, sizeof(where_msg),                  \
181                        "%s, line %i\n", __FILE__, __LINE__);               \
182                    fprintf(stderr, "%s: %s\n", error_msg, where_msg);      \
183                    exit(1);                                                \
184            }
185    
186    #endif  /*  !HAVE___FUNCTION__  */
187    
188    
189    #define CHECK_ALLOCATION(ptr)                                   {       \
190                    if ((ptr) == NULL)                                      \
191                            FAILURE("Out of memory");                       \
192            }
193    
194    
195  /*  bootblock.c:  */  /*  bootblock.c:  */
196  int load_bootblock(struct machine *m, struct cpu *cpu,  int load_bootblock(struct machine *m, struct cpu *cpu,
197          int *n_loadp, char ***load_namesp);          int *n_loadp, char ***load_namesp);
# Line 211  int mymkstemp(char *template); Line 241  int mymkstemp(char *template);
241  size_t mystrlcpy(char *dst, const char *src, size_t size);  size_t mystrlcpy(char *dst, const char *src, size_t size);
242  size_t mystrlcat(char *dst, const char *src, size_t size);  size_t mystrlcat(char *dst, const char *src, size_t size);
243  #endif  #endif
244    void print_separator_line(void);
245    
246    
247  /*  pc_bios.c:  */  /*  mvmeprom.c:  */
248  void pc_bios_simple_pmode_setup(struct cpu *cpu);  void mvmeprom_init(struct machine *machine);
249  void pc_bios_init(struct cpu *cpu);  int mvmeprom_emul(struct cpu *cpu);
 int pc_bios_emul(struct cpu *cpu);  
250    
251    
252  /*  ps2_bios.c:  */  /*  ps2_bios.c:  */
# Line 228  void sh_ipl_g_emul_init(struct machine * Line 258  void sh_ipl_g_emul_init(struct machine *
258  int sh_ipl_g_emul(struct cpu *);  int sh_ipl_g_emul(struct cpu *);
259    
260    
 /*  useremul.c:  */  
 void useremul_setup(struct cpu *, int, char **);  
 void useremul_syscall(struct cpu *cpu, uint32_t code);  
 void useremul_name_to_useremul(struct cpu *, char *name,  
         int *arch, char **machine_name, char **cpu_name);  
 void useremul_list_emuls(void);  
 void useremul_init(void);  
   
   
261  /*  yamon.c:  */  /*  yamon.c:  */
262  void yamon_machine_setup(struct machine *machine, uint64_t env);  void yamon_machine_setup(struct machine *machine, uint64_t env);
263  int yamon_emul(struct cpu *);  int yamon_emul(struct cpu *);

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26