diff --git a/ChangeLog b/ChangeLog index a625467..3a0392f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Fix a few potential buffer overflows and wrap assignment statements in parens. * Convert build system to plain Make. * Start removing references to FreeNode. + * Move the repeated copyright banners out to a single header. 2005-04-01 Riccardo Mottola * network.c : removed useless statement diff --git a/src/config.h b/src/config.h index 1a0ecbc..5fdc7f5 100644 --- a/src/config.h +++ b/src/config.h @@ -102,3 +102,4 @@ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ +#include "copyright.h" diff --git a/src/copyright.h b/src/copyright.h new file mode 100644 index 0000000..46096d0 --- /dev/null +++ b/src/copyright.h @@ -0,0 +1,30 @@ +/* + Copyright (c) 2004-2005, Riccardo Mottola + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + Neither the name of "Riccardo Mottola" nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + diff --git a/src/filesave.c b/src/filesave.c index 366ff1e..084cfe6 100644 --- a/src/filesave.c +++ b/src/filesave.c @@ -2,44 +2,8 @@ * filesave.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - #include #include @@ -104,3 +68,4 @@ void saveFileCbk (Widget w, XtPointer clientData, XtPointer callData) XtUnmanageChild(w); } } +#include "copyright.h" diff --git a/src/filesave.h b/src/filesave.h index c28cb36..a290df3 100644 --- a/src/filesave.h +++ b/src/filesave.h @@ -2,42 +2,7 @@ * filesave.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - void saveFile(Widget parent); +#include "copyright.h" diff --git a/src/help.c b/src/help.c index b028280..da2c010 100644 --- a/src/help.c +++ b/src/help.c @@ -2,44 +2,8 @@ * help.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - #include #include #include @@ -163,3 +127,4 @@ void displayCommandsHelpBox() { XtManageChild(commandsHelpDlgBox); } +#include "copyright.h" diff --git a/src/help.h b/src/help.h index a0fdc93..695f94b 100644 --- a/src/help.h +++ b/src/help.h @@ -2,46 +2,11 @@ * help.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - void createAboutBox(Widget parent); void aboutOkCbk(); void displayAboutBox(); void createCommandsHelpBox(Widget parent); void displayCommandsHelpBox(); +#include "copyright.h" diff --git a/src/interpreter.c b/src/interpreter.c index 9a2ad04..acea86f 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -2,43 +2,8 @@ * interpreter.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include #include @@ -849,3 +814,4 @@ void handleCTCPVersion (char *sender) sprintf(localEcho, "[ sent Version to %s ]\n", nick); appendText(localEcho); } +#include "copyright.h" diff --git a/src/interpreter.h b/src/interpreter.h index 927aa93..b59601e 100644 --- a/src/interpreter.h +++ b/src/interpreter.h @@ -2,29 +2,8 @@ * interpreter.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #define RPL_WELCOME 001 #define RPL_WHOISUSER 311 #define RPL_WHOISSERVER 312 @@ -56,3 +35,4 @@ void handlePartNotify(char *sender, char *desc); void handleNamesReply(char *message); void handleMode (char *sender, char *dest, char *msg); void handleCTCPVersion (char *sender); +#include "copyright.h" diff --git a/src/main.c b/src/main.c index 76034be..d123540 100644 --- a/src/main.c +++ b/src/main.c @@ -2,49 +2,13 @@ * main.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ #include #include -#include #include - -#include "main.h" +#include #include #include @@ -55,6 +19,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include "main.h" #include "interpreter.h" #include "help.h" #include "preferences.h" @@ -69,11 +34,11 @@ void fileMenuCall(Widget w, XtPointer clientData, XtPointer callData); void userMenuCall(Widget w, XtPointer clientData, XtPointer callData); void helpMenuCall(Widget w, XtPointer clientData, XtPointer callData); void userListSelectCbk(Widget w, XtPointer data, XtPointer callData); -void commandInputCall(); +void inputAreaCall(); Widget mainWindow; -Widget commandInput; +Widget inputArea; Widget outputArea; Widget userList; @@ -90,7 +55,7 @@ char *selectedUser; systemStatusRecord sysState; int main (int argc, char *argv[]) -{ + { Widget topWidget; Widget mainForm; Widget userForm; @@ -98,192 +63,122 @@ int main (int argc, char *argv[]) /* Menu Stuff */ Widget menuBar, helpMenu; - static String fallback_resources[] = { - "*sgiMode: True", - "*useSchemes: all", - NULL }; + topWidget = XtVaAppInitialize(&nebulaIrcAppContext, "Nebula IRC", NULL, 0, &argc, argv, NULL, NULL); - topWidget = XtVaAppInitialize(&nebulaIrcAppContext, "Nebula IRC", - NULL, 0, /* no command line options */ - &argc, argv, - fallback_resources, /* fallback resource list */ - NULL); + mainWindow = XtVaCreateManagedWidget("main_window", xmMainWindowWidgetClass, topWidget, XmNcommandWindowLocation, XmCOMMAND_BELOW_WORKSPACE, XmNwidth, 600, XmNheight, 500, NULL); - mainWindow = XtVaCreateManagedWidget("main_window", - xmMainWindowWidgetClass, topWidget, - XmNcommandWindowLocation, XmCOMMAND_BELOW_WORKSPACE, - XmNwidth, 600, - XmNheight, 500, - NULL); - - /* create menu bar */ - { - XmString fileMenuStr, userMenuStr, helpMenuStr; - - fileMenuStr = XM_STRING_CREATE("File"); - userMenuStr = XM_STRING_CREATE("User"); - helpMenuStr = XM_STRING_CREATE("Help"); - - menuBar = XmVaCreateSimpleMenuBar(mainWindow, "menubar", - XmVaCASCADEBUTTON, fileMenuStr, 'F', - XmVaCASCADEBUTTON, userMenuStr, 'U', - NULL); - - XmStringFree(fileMenuStr); - XmStringFree(userMenuStr); - XmStringFree(helpMenuStr); - } + menuBar = XmVaCreateSimpleMenuBar(mainWindow, "menubar", + XmVaCASCADEBUTTON, XM_STRING_CREATE("File"), 'F', + XmVaCASCADEBUTTON, XM_STRING_CREATE("User"), 'U', + NULL); - /* File Menu */ - { - XmString prefStr; - XmString saveConvStr; - XmString quitStr; - - prefStr = XM_STRING_CREATE("Preferences..."); - saveConvStr = XM_STRING_CREATE("Save Conversation..."); - quitStr = XM_STRING_CREATE("Quit"); - XmVaCreateSimplePulldownMenu(menuBar, "file_menu", 0, - fileMenuCall, - XmVaPUSHBUTTON, prefStr, 'P', NULL, NULL, - XmVaPUSHBUTTON, saveConvStr, 'S', NULL, NULL, - XmVaPUSHBUTTON, quitStr, 'Q', NULL, NULL, - NULL); - XmStringFree(prefStr); - XmStringFree(saveConvStr); - XmStringFree(quitStr); - } - /* User Menu */ - { - XmString whoisStr; - XmString versionStr; - XmString opStr; - XmString deopStr; - - whoisStr = XM_STRING_CREATE("Whois"); - versionStr = XM_STRING_CREATE("Client version"); - opStr = XM_STRING_CREATE("Op"); - deopStr = XM_STRING_CREATE("Deop"); - XmVaCreateSimplePulldownMenu(menuBar, "user_menu", 1, - userMenuCall, - XmVaPUSHBUTTON, whoisStr, 'W', NULL, NULL, - XmVaPUSHBUTTON, versionStr, '\0', NULL, NULL, - XmVaPUSHBUTTON, opStr, 'O', NULL, NULL, - XmVaPUSHBUTTON, deopStr, 'D', NULL, NULL, - NULL); - XmStringFree(whoisStr); - XmStringFree(versionStr); - XmStringFree(opStr); - XmStringFree(deopStr); - } - /* Help Menu */ - { - XmString helpCommandStr; - XmString aboutStr; - - helpCommandStr = XM_STRING_CREATE("Commands..."); - aboutStr = XM_STRING_CREATE("About..."); - helpMenu = XtVaCreateManagedWidget("Help", - xmCascadeButtonWidgetClass, menuBar, - XmNmnemonic, 'H', - NULL); - XmVaCreateSimplePulldownMenu(menuBar, "Help", 2, - helpMenuCall, - XmVaPUSHBUTTON, aboutStr, 'A', NULL, NULL, - XmVaPUSHBUTTON, helpCommandStr, 'C', NULL, NULL, - NULL); - XmStringFree(helpCommandStr); - XmStringFree(aboutStr); + XmVaCreateSimplePulldownMenu(menuBar, "file_menu", 0, + fileMenuCall, + XmVaPUSHBUTTON, XM_STRING_CREATE("Preferences..."), 'P', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Save Conversation"), 'S', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Quit"), 'Q', NULL, NULL, + NULL); - /* now set the help button */ - XtVaSetValues(menuBar, XmNmenuHelpWidget, helpMenu, NULL); - } + XmVaCreateSimplePulldownMenu(menuBar, "user_menu", 1, + userMenuCall, + XmVaPUSHBUTTON, XM_STRING_CREATE("Whois"), 'W', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Client version"), '\0', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Op"), 'O', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Deop"), 'D', NULL, NULL, + NULL); + + helpMenu = XtVaCreateManagedWidget("Help", + xmCascadeButtonWidgetClass, menuBar, + XmNmnemonic, 'H', + NULL); + XmVaCreateSimplePulldownMenu(menuBar, "Help", 2, + helpMenuCall, + XmVaPUSHBUTTON, XM_STRING_CREATE("About..."), 'A', NULL, NULL, + XmVaPUSHBUTTON, XM_STRING_CREATE("Commands"), 'C', NULL, NULL, + NULL); + + XtVaSetValues(menuBar, XmNmenuHelpWidget, helpMenu, NULL); - /* now manage the menu bar */ XtManageChild(menuBar); - /* create a form */ mainForm = XtVaCreateWidget("form", xmFormWidgetClass, mainWindow, XmNfractionBase, 3, NULL); - /* vertical split user form */ userForm = XtVaCreateWidget("userform", xmFormWidgetClass, mainForm, - XmNfractionBase, 5, - XmNtopAttachment, XmATTACH_FORM, - XmNleftAttachment, XmATTACH_FORM, - XmNbottomAttachment, XmATTACH_FORM, - XmNrightAttachment, XmATTACH_FORM, - NULL); - - /* output area */ - { - Arg args[12]; + XmNfractionBase, 5, + XmNtopAttachment, XmATTACH_FORM, + XmNleftAttachment, XmATTACH_FORM, + XmNbottomAttachment, XmATTACH_FORM, + XmNrightAttachment, XmATTACH_FORM, + NULL); - XtSetArg(args[0], XmNeditable, False); - XtSetArg(args[1], XmNeditMode, XmMULTI_LINE_EDIT); - XtSetArg(args[2], XmNscrollHorizontal, False); - XtSetArg(args[3], XmNwordWrap, True); - XtSetArg(args[4], XmNtopAttachment, XmATTACH_POSITION); - XtSetArg(args[5], XmNtopPosition, 0); - XtSetArg(args[6], XmNbottomAttachment, XmATTACH_POSITION); - XtSetArg(args[7], XmNbottomPosition, 5); - XtSetArg(args[8], XmNleftAttachment, XmATTACH_POSITION); - XtSetArg(args[9], XmNleftPosition, 0); - XtSetArg(args[10], XmNrightAttachment, XmATTACH_POSITION); - XtSetArg(args[11], XmNrightPosition, 4); - outputArea = XmCreateScrolledText(userForm, "output", args, 12); - - if (outputArea == NULL) - perror("outputArea: "); - XtManageChild(outputArea); - } - /* user list at left */ - { - Arg args[9]; + Arg outputArgs[13]; + + XtSetArg(outputArgs[0], XmNeditable, False); + XtSetArg(outputArgs[1], XmNeditMode, XmMULTI_LINE_EDIT); + XtSetArg(outputArgs[2], XmNscrollHorizontal, False); + XtSetArg(outputArgs[3], XmNwordWrap, True); + XtSetArg(outputArgs[4], XmNtopAttachment, XmATTACH_POSITION); + XtSetArg(outputArgs[5], XmNtopPosition, 0); + XtSetArg(outputArgs[6], XmNbottomAttachment, XmATTACH_POSITION); + XtSetArg(outputArgs[7], XmNbottomPosition, 5); + XtSetArg(outputArgs[8], XmNleftAttachment, XmATTACH_POSITION); + XtSetArg(outputArgs[9], XmNleftPosition, 0); + XtSetArg(outputArgs[10], XmNrightAttachment, XmATTACH_POSITION); + XtSetArg(outputArgs[11], XmNrightPosition, 4); + XtSetArg(outputArgs[12], XmNcursorPositionVisible, False); + outputArea = XmCreateScrolledText(userForm, "output", outputArgs, 13); - XtSetArg(args[0], XmNtopAttachment, XmATTACH_POSITION); - XtSetArg(args[1], XmNtopPosition, 0); - XtSetArg(args[2], XmNbottomAttachment, XmATTACH_POSITION); - XtSetArg(args[3], XmNbottomPosition, 5); - XtSetArg(args[4], XmNleftAttachment, XmATTACH_POSITION); - XtSetArg(args[5], XmNleftPosition, 4); - XtSetArg(args[6], XmNrightAttachment, XmATTACH_POSITION); - XtSetArg(args[7], XmNrightPosition, 5); - XtSetArg(args[8], XmNselectionPolicy, XmSINGLE_SELECT); - userList = XmCreateScrolledList(userForm, "list", args, 9); - XtAddCallback(userList, XmNsingleSelectionCallback, userListSelectCbk, NULL); - XtManageChild(userList); - } + if (outputArea == NULL) + perror("outputArea: "); + XtManageChild(outputArea); + + + Arg ulistArgs[9]; + + XtSetArg(ulistArgs[0], XmNtopAttachment, XmATTACH_POSITION); + XtSetArg(ulistArgs[1], XmNtopPosition, 0); + XtSetArg(ulistArgs[2], XmNbottomAttachment, XmATTACH_POSITION); + XtSetArg(ulistArgs[3], XmNbottomPosition, 5); + XtSetArg(ulistArgs[4], XmNleftAttachment, XmATTACH_POSITION); + XtSetArg(ulistArgs[5], XmNleftPosition, 4); + XtSetArg(ulistArgs[6], XmNrightAttachment, XmATTACH_POSITION); + XtSetArg(ulistArgs[7], XmNrightPosition, 5); + XtSetArg(ulistArgs[8], XmNselectionPolicy, XmSINGLE_SELECT); + userList = XmCreateScrolledList(userForm, "list", ulistArgs, 9); + XtAddCallback(userList, XmNsingleSelectionCallback, userListSelectCbk, NULL); + XtManageChild(userList); + XtManageChild(userForm); XtManageChild(mainForm); - /* Command line area */ - commandInput = XtVaCreateWidget("command", - xmTextFieldWidgetClass, mainWindow, - XmNmaxLength, MAX_INPUT_LEN, - NULL); - XtAddCallback(commandInput, XmNactivateCallback, commandInputCall, NULL); - XtManageChild(commandInput); + + inputArea = XtVaCreateWidget("input", + xmTextFieldWidgetClass, mainWindow, + XmNmaxLength, MAX_INPUT_LEN, + NULL); + XtAddCallback(inputArea, XmNactivateCallback, inputAreaCall, NULL); + XtManageChild(inputArea); XtVaSetValues(mainWindow, - XmNmenuBar, menuBar, - XmNworkWindow, mainForm, - XmNcommandWindow, commandInput, - NULL); + XmNmenuBar, menuBar, + XmNworkWindow, mainForm, + XmNcommandWindow, inputArea, + NULL); XtManageChild(mainWindow); XtRealizeWidget(topWidget); - /* initialize System Status */ +/* initialize System Status */ sysState.isConnected = NO; /* set focus to input area */ /* For Motif 1.0 we should use _XmGrabTheFocus(target) according to FAQ */ - XmProcessTraversal(commandInput, XmTRAVERSE_CURRENT); + XmProcessTraversal(inputArea, XmTRAVERSE_CURRENT); /* initialize hostname and system info */ /* should switch back to ARCHOS if uname not available */ - { + { struct utsname sysInfo; char tempName[2*SYSINFO_LEN]; @@ -292,65 +187,65 @@ int main (int argc, char *argv[]) sprintf(tempName, "%s %s running on %s", sysInfo.sysname, sysInfo.release, sysInfo.machine); tempName[SYSINFO_LEN] = '\0'; strcpy(sysState.systemInfo, tempName); - } + } /* get the user login name from unix */ - { + { char *tempName; tempName = getenv("USER"); if (tempName == NULL) tempName = getenv("LOGNAME"); if (strlen(tempName) > MAX_NAME_LEN || tempName == NULL) - { + { strcpy(sysState.myUnixname, "noname"); printf("Failed to get a proper Unix login name. Using: %s\n", sysState.myUnixname); - } + } strcpy(sysState.myUnixname, tempName); - } + } /* create unmanaged dialogs */ createAboutBox(mainWindow); createCommandsHelpBox(mainWindow); while(1) - { + { XEvent theEvent; XtAppNextEvent(nebulaIrcAppContext, &theEvent); XtDispatchEvent(&theEvent); + } } -} /* saves the text in the conversation window */ void fileMenuCall(Widget w, XtPointer clientData, XtPointer callData) -{ -long int itemNum; - -itemNum = (long int) clientData; -switch (itemNum) { - case 0: - setPreferences(mainWindow); - break; - case 1: - saveFile(mainWindow); - break; - case 2: - quitApplication(); - break; - default: - break; + long int itemNum; + + itemNum = (long int) clientData; + switch (itemNum) + { + case 0: + setPreferences(mainWindow); + break; + case 1: + saveFile(mainWindow); + break; + case 2: + quitApplication(); + break; + default: + break; + } } -} void helpMenuCall(Widget w, XtPointer clientData, XtPointer callData) -{ -long int itemNum; -fprintf(stderr, "Size of clientData: %lu\nSize of itemNum: %lu\n", sizeof(clientData), sizeof(itemNum)); + { + long int itemNum; + fprintf(stderr, "Size of clientData: %lu\nSize of itemNum: %lu\n", sizeof(clientData), sizeof(itemNum)); -itemNum = (long int) clientData; -switch (itemNum) + itemNum = (long int) clientData; + switch (itemNum) { case 0: displayAboutBox(); @@ -361,11 +256,11 @@ switch (itemNum) default: break; } -} + } void userMenuCall(Widget w, XtPointer clientData, XtPointer callData) -{ -long int itemNum; + { + long int itemNum; #ifdef DEBUG printf("user: %s\n", selectedUser); @@ -375,60 +270,57 @@ long int itemNum; itemNum = (long int) clientData; switch (itemNum) - { - case 0: - printf("Whois!\n"); - doWhois(selectedUser); - break; - case 1: - printf("version!\n"); - doCTCPVersion(selectedUser); - break; - case 2: - printf("op!\n"); - doMode(sysState.currentChannel, "+o", selectedUser, NULL, NULL); - break; - case 3: - printf("deop!\n"); - doMode(sysState.currentChannel, "-o", selectedUser, NULL, NULL); - break; - default: - break; + { + case 0: + printf("Whois!\n"); + doWhois(selectedUser); + break; + case 1: + printf("version!\n"); + doCTCPVersion(selectedUser); + break; + case 2: + printf("op!\n"); + doMode(sysState.currentChannel, "+o", selectedUser, NULL, NULL); + break; + case 3: + printf("deop!\n"); + doMode(sysState.currentChannel, "-o", selectedUser, NULL, NULL); + break; + default: + break; + } } -} void userListSelectCbk(Widget w, XtPointer data, XtPointer callData) -{ + { XmListCallbackStruct *listCbs; listCbs = (XmListCallbackStruct *)callData; XmStringGetLtoR(listCbs->item, XmFONTLIST_DEFAULT_TAG, &selectedUser); -} + } -void commandInputCall() -{ - char *command; - - command = XmTextGetString(commandInput); - interpretCommand(command); - XmTextSetString(commandInput,""); - XtFree(command); -} +void inputAreaCall() + { + interpretCommand(XmTextGetString(inputArea)); + XmTextSetString(inputArea,""); + } void quitApplication() -{ + { disconnectFromServer(); exit(0); -} + } /* appends text at the bottom of the main text widget */ void appendText(char *msg) -{ + { XmTextPosition lastPos; lastPos = XmTextGetLastPosition(outputArea); XmTextInsert(outputArea, lastPos, msg); lastPos = XmTextGetLastPosition(outputArea); XmTextSetInsertionPosition(outputArea, lastPos); -} + } +#include "copyright.h" diff --git a/src/main.h b/src/main.h index 656f895..07b5c76 100644 --- a/src/main.h +++ b/src/main.h @@ -2,44 +2,8 @@ * main.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "config.h" #include /* for MAXHOSTNAMELEN */ #include /* for MAXHOSTNAMELEN on other systems */ @@ -47,6 +11,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CLIENT_NAME "Nebula IRC" #define CLIENT_VERSION PACKAGE_VERSION +#include "config.h" #define SYSINFO_LEN 128 #define MAX_COMMAND_LEN 1024 @@ -108,3 +73,4 @@ void appendText(char *msg); #define XM_STRING_GEN_COMP(str)\ XmStringCreateLtoR(str, XmFONTLIST_DEFAULT_TAG); #endif +#include "copyright.h" diff --git a/src/network.c b/src/network.c index 43e2d5d..ac443ce 100644 --- a/src/network.c +++ b/src/network.c @@ -2,42 +2,8 @@ * network.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the abov copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ #include #include @@ -461,3 +427,4 @@ void doCTCPAction(char *recipient, char *message) sprintf(localEcho, "[%s] %s\n", sysState.myNick, message); appendText(localEcho); } +#include "copyright.h" diff --git a/src/network.h b/src/network.h index 89ff9c1..1296a8c 100644 --- a/src/network.h +++ b/src/network.h @@ -2,42 +2,8 @@ * network.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ int connectToServer(char *servName, int port); void disconnectFromServer(); @@ -54,3 +20,4 @@ void doMode (char *recipient, char *option, char *limit, char *user, char *banma void doWhois(char *nick); void doCTCPVersion (char *recipient); void doCTCPAction(char *recipient, char *message); +#include "copyright.h" diff --git a/src/preferences.c b/src/preferences.c index 24b0a1e..eb9f6cb 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -2,43 +2,8 @@ * preferences.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include #include #include @@ -408,3 +373,4 @@ char* getPreferencesFilePath() } return filePath; } +#include "copyright.h" diff --git a/src/preferences.h b/src/preferences.h index 513e2dc..f52a261 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -2,43 +2,10 @@ * preferences.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004-2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ void getStartupPrefs(Widget mainWin); void setPreferences(Widget mainWin); char* getPreferencesFilePath(); +#include "copyright.h" diff --git a/src/signals.c b/src/signals.c index d9027f3..72f0563 100644 --- a/src/signals.c +++ b/src/signals.c @@ -2,43 +2,8 @@ * signals.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include #include #include @@ -69,3 +34,4 @@ RETSIGTYPE brokenPipe() sysState.isAuthenticated = NO; } +#include "copyright.h" diff --git a/src/signals.h b/src/signals.h index 4f32ea8..8242366 100644 --- a/src/signals.h +++ b/src/signals.h @@ -2,43 +2,7 @@ * signals.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2004 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2004-2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - RETSIGTYPE brokenPipe(); +#include "copyright.h" diff --git a/src/userlist.c b/src/userlist.c index 818fa73..1388c67 100644 --- a/src/userlist.c +++ b/src/userlist.c @@ -2,43 +2,8 @@ * userlist.c * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include #include @@ -80,3 +45,4 @@ void removeAllUsersFromList(Widget listWidget) { XmListDeleteAllItems(listWidget); } +#include "copyright.h" diff --git a/src/userlist.h b/src/userlist.h index 2b291be..0d8a9a6 100644 --- a/src/userlist.h +++ b/src/userlist.h @@ -2,46 +2,12 @@ * userlist.h * * --------------------------------------------------------------------- * * This file is part of the nebula irc client * - * http://nebula-irc.sourceforge.net * - - * Copyright (c) 2005 Riccardo Mottola. All rights reserved. * - * mail: rmottola@users.sourceforge.net * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* -Copyright (c) 2005, Riccardo Mottola - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of "Riccardo Mottola" nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS;ŽOR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include void addUserToList(char *nick, Widget listWidget); void removeUserFromList(char *nick, Widget listWidget); void renameUserInList(char *oldNick, char *newNick, Widget listWidget); void removeAllUsersFromList(Widget listWidget); +#include "copyright.h"