]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.h
experimental new persistent console history (uses same buffer as console output)...
[xonotic/darkplaces.git] / console.h
index 9042ac069b8d2b4768215eac0e1bf6e192136966..be1010ded02a692d1f2ec9b2acc2718de8c1a361 100644 (file)
--- a/console.h
+++ b/console.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -27,21 +27,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern int con_totallines;
 extern int con_backscroll;
 extern qboolean con_initialized;
-extern qbyte *con_chars;
-extern int con_notifylines;            // scan lines to clear for notify lines
+
+void Con_Rcon_Redirect_Init(lhnetsocket_t *sock, lhnetaddress_t *dest);
+void Con_Rcon_Redirect_End();
+void Con_Rcon_Redirect_Abort();
 
 void Con_CheckResize (void);
 void Con_Init (void);
+void Con_Init_Commands (void);
 void Con_DrawConsole (int lines);
-void Con_Print (const char *txt);
-void Con_Printf (const char *fmt, ...);
-void Con_DPrintf (const char *fmt, ...);
-void Con_SafePrintf (const char *fmt, ...);
+void Con_Print(const char *txt);
+void Con_PrintNotToHistory(const char *txt);
+void Con_Printf(const char *fmt, ...) DP_FUNC_PRINTF(1);
+void Con_DPrint(const char *msg);
+void Con_DPrintf(const char *fmt, ...) DP_FUNC_PRINTF(1);
 void Con_Clear_f (void);
 void Con_DrawNotify (void);
 void Con_ClearNotify (void);
 void Con_ToggleConsole_f (void);
 
+qboolean GetMapList (const char *s, char *completedname, int completednamebufferlength);
+
 // wrapper function to attempt to either complete the command line
 // or to list possible matches grouped by type
 // (i.e. will display possible variables, aliases, commands
@@ -52,5 +58,28 @@ void Con_CompleteCommandLine(void);
 // formatted in columns on the console
 void Con_DisplayList(const char **list);
 
+
+//
+// log
+//
+void Log_Init (void);
+void Log_Close (void);
+void Log_Start (void);
+void Log_DestBuffer_Flush (void); // call this once per frame to send out replies to rcon streaming clients
+
+void Log_Printf(const char *logfilename, const char *fmt, ...) DP_FUNC_PRINTF(2);
+
+#define CON_MASK_HIDENOTIFY 128
+#define CON_MASK_CHAT 1
+#define CON_MASK_INPUT 2
+#define CON_MASK_LOADEDHISTORY 4
+
+void Con_AddLine(const char *line, int len, int mask);
+int Con_FindPrevLine(int mask_must, int mask_mustnot, int start);
+int Con_FindNextLine(int mask_must, int mask_mustnot, int start);
+const char *Con_GetLine(int i);
+int Con_GetLineID(int i);
+int Con_GetLineByID(int i);
+
 #endif