Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

jdb_console_buffer_i.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef jdb_console_buffer_i_h
00004 #define jdb_console_buffer_i_h
00005 
00006 #include <cstdio>
00007 #include <cstring>
00008 #include <cstdlib>
00009 
00010 #include "cmdline.h"
00011 #include "config.h"
00012 #include "jdb_module.h"
00013 #include "jdb.h"
00014 #include "kernel_console.h"
00015 #include "keycodes.h"
00016 #include "kmem_alloc.h"
00017 #include "static_init.h"
00018 
00025 class Console_buffer : public Console
00026 {
00027 private:
00028   static bool _enabled;
00029   static size_t out_buf_size;
00030   static size_t out_buf_len;
00031   static char *out_buf;
00032   static char *out_buf_w;
00033 
00034 public:  
00035   Console_buffer();
00036   
00041   static void alloc( size_t size);
00042   
00043   ~Console_buffer();
00044   
00045   int write( char const *str, size_t len );
00046   
00047   int getchar(bool);
00048   
00056   static int print_buffer(unsigned lines);
00057   
00065   static int print_buffer(const char *str);
00066   
00067   Mword get_attributes() const;
00068   
00069   static FIASCO_INIT void init();
00070 
00071 private:  
00072   static void at_jdb_enter();
00073   
00074   static void at_jdb_leave();
00075   
00076   static inline void inc_ptr(char **c);
00077   
00078   static inline void dec_out_ptr(char **c);
00079   
00080   static int strncmp(char *start, const char *search, size_t len);
00081 };
00082 
00083 
00085 
00086 class Jdb_cb : public Jdb_module
00087 {
00088   static char  first_char;
00089   static char  search_str[30];
00090   static Mword output_lines;
00091 
00092 public:  
00093   Jdb_module::Action_code action(int cmd, void *&args, char const *&fmt, int &next_char);
00094   
00095   Jdb_module::Cmd const *const cmds() const;
00096   
00097   int const num_cmds() const;
00098   
00099   Jdb_cb();
00100 };
00101 
00102 //
00103 // IMPLEMENTATION of inline functions follows
00104 //
00105 
00106 
00107 
00108 
00109 inline void
00110 Console_buffer::inc_ptr(char **c)
00111 {
00112   if (++*c >= out_buf + out_buf_size)
00113     *c = out_buf;
00114 }
00115 
00116 
00117 
00118 inline void
00119 Console_buffer::dec_out_ptr(char **c)
00120 {
00121   if (--*c < out_buf)
00122     *c += out_buf_size;
00123 }
00124 
00125 #endif // jdb_console_buffer_i_h

Generated on Mon Sep 26 14:20:10 2005 for Fiasco by  doxygen 1.4.2