/* X-Chat * Copyright (C) 1998 Peter Zelezny. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include #include #include #include #include #include #include #include "fe-gtk.h" #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/cfgfiles.h" #include "../common/outbound.h" #include "../common/fe.h" #include "../common/text.h" #include "gtkutil.h" #include "xtext.h" #include "maingui.h" #include "palette.h" #include "textgui.h" extern struct text_event te[]; extern char *pntevts_text[]; extern char *pntevts[]; static GtkWidget *pevent_dialog = NULL, *pevent_dialog_twid, *pevent_dialog_entry, *pevent_dialog_list, *pevent_dialog_hlist; enum { COL_EVENT_NAME, COL_EVENT_TEXT, COL_ROW, N_COLUMNS }; /* this is only used in xtext.c for indented timestamping */ int xtext_get_stamp_str (time_t tim, char **ret) { return get_stamp_str (prefs.hex_stamp_text_format, tim, ret); } static void PrintTextLine (xtext_buffer *xtbuf, unsigned char *text, int len, int indent, time_t timet) { unsigned char *tab, *new_text; int leftlen; if (len == 0) len = 1; if (!indent) { if (prefs.hex_stamp_text) { int stamp_size; char *stamp; if (timet == 0) timet = time (0); stamp_size = get_stamp_str (prefs.hex_stamp_text_format, timet, &stamp); new_text = malloc (len + stamp_size + 1); memcpy (new_text, stamp, stamp_size); g_free (stamp); memcpy (new_text + stamp_size, text, len); gtk_xtext_append (xtbuf, new_text, len + stamp_size); free (new_text); } else gtk_xtext_append (xtbuf, text, len); return; } tab = strchr (text, '\t'); if (tab && tab < (text + len)) { leftlen = tab - text; gtk_xtext_append_indent (xtbuf, text, leftlen, tab + 1, len - (leftlen + 1), timet); } else gtk_xtext_append_indent (xtbuf, 0, 0, text, len, timet); } void PrintTextRaw (void *xtbuf, unsigned char *text, int indent, time_t stamp) { char *last_text = text; int len = 0; int beep_done = FALSE; /* split the text into separate lines */ while (1) { switch (*text) { case 0: PrintTextLine (xtbuf, last_text, len, indent, stamp); return; case '\n': PrintTextLine (xtbuf, last_text, len, indent, stamp); text++; if (*text == 0) return; last_text = text; len = 0; break; case ATTR_BEEP: *text = ' '; if (!beep_done) /* beeps may be slow, so only do 1 per line */ { beep_done = TRUE; if (!prefs.hex_input_filter_beep) gdk_beep (); } default: text++; len++; } } } static void pevent_dialog_close (GtkWidget *wid, gpointer arg) { pevent_dialog = NULL; pevent_save (NULL); } static void pevent_dialog_update (GtkWidget * wid, GtkWidget * twid) { int len, m; const char *text; char *out; int sig; GtkTreeIter iter; GtkListStore *store; if (!gtkutil_treeview_get_selected (GTK_TREE_VIEW (pevent_dialog_list), &iter, COL_ROW, &sig, -1)) return; text = gtk_entry_get_text (GTK_ENTRY (wid)); len = strlen (text); if (pevt_build_string (text, &out, &m) != 0) { fe_message (_("There was an error parsing the string"), FE_MSG_ERROR); return; } if (m > (te[sig].num_args & 0x7f)) { free (out); out = malloc (4096); snprintf (out, 4096, _("This signal is only passed %d args, $%d is invalid"), te[sig].num_args & 0x7f, m); fe_message (out, FE_MSG_WARN); free (out); return; } store = (GtkListStore *)gtk_tree_view_get_model (GTK_TREE_VIEW (pevent_dialog_list)); gtk_list_store_set (store, &iter, COL_EVENT_TEXT, text, -1); if (pntevts_text[sig]) free (pntevts_text[sig]
@echo off
set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\WinDDK\7600.16385.1\inc\ddk
set LIB=c:\WinDDK\7600.16385.1\lib\wnet\amd64;c:\WinDDK\7600.16385.1\lib\Crt\amd64
set PATH=c:\WinDDK\7600.16385.1\bin\x86\amd64;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;c:\mozilla-build\msys\bin;c:\mozilla-build\moztools-x64\bin
set BUILD_OPT=1
set USE_64=1
set WINDDK_BUILD=1
cd mozilla\security\nss
make nss_build_all
cd ..\..\..
echo.Finished!
pause