Lines Matching defs:notice
138 KEY("notice"),
229 comment(Notice_t* notice, register Buffer_t* b, register char* s, register int n, int u)
236 cc = notice->cc[1];
241 PUT(b, notice->cc[n > 0 ? 0 : 1]);
244 PUT(b, notice->cc[n > 0 ? 1 : 2]);
278 expand(Notice_t* notice, register Buffer_t* b, const Item_t* item)
306 if ((c = lookup(key, x, t - x - 1)) >= 0 && (x = notice->item[c].data))
308 z = x + notice->item[c].size;
328 * generate a copright notice
332 copyright(Notice_t* notice, register Buffer_t* b)
339 if (notice->test)
344 if ((x = notice->item[SINCE].data) && strncmp(x, t, 4))
346 expand(notice, b, ¬ice->item[SINCE]);
350 if (notice->item[PARENT].data)
353 expand(notice, b, ¬ice->item[PARENT]);
355 if (notice->item[CORPORATION].data)
358 expand(notice, b, ¬ice->item[CORPORATION]);
359 if (notice->item[INCORPORATION].data)
362 expand(notice, b, ¬ice->item[INCORPORATION]);
365 else if (notice->item[COMPANY].data)
368 expand(notice, b, ¬ice->item[COMPANY]);
396 Notice_t notice;
431 notice.test = 0;
432 notice.type = NONE;
433 notice.verbose = 0;
434 notice.ids = 0;
435 notice.cc[0] = cc1;
436 notice.cc[1] = cc2;
437 notice.cc[2] = cc3;
439 notice.item[i].data = 0;
440 notice.item[STYLE] = notice.item[CLASS] = lic[notice.type];
441 notice.item[STYLE].quote = notice.item[CLASS].quote = 0;
548 for (i = 0; i < notice.ids; i++)
549 if (n == notice.id[i].name.size && !strncmp(x, notice.id[i].name.data, n))
553 notice.id[i].name.data = x;
554 notice.id[i].name.size = n;
555 notice.id[i].name.quote = 0;
556 notice.id[i].value.data = v;
557 notice.id[i].value.size = s - v;
558 notice.id[i].value.quote = quote;
559 if (notice.ids <= i)
560 notice.ids = i + 1;
568 if (notice.item[i].size)
570 expand(¬ice, &buf, &key[i]);
573 if (h >= notice.item[i].size)
578 else if (notice.item[i].data[h] == ' ' || notice.item[i].data[h] == '\t')
582 expand(¬ice, &buf, ¬ice.item[i]);
595 expand(¬ice, &buf, &item);
598 expand(¬ice, &buf, ¬ice.item[h]);
611 notice.test = 1;
615 notice.verbose = 1;
619 notice.type = c;
626 notice.type = c;
627 notice.item[CLASS].data = lic[lic[c].quote].data;
628 notice.item[CLASS].size = lic[lic[c].quote].size;
633 notice.item[h].data = (notice.item[h].size = s - v) ? v : (char*)0;
634 notice.item[h].quote = quote;
667 if (notice.type == INLINE && (!notice.verbose || !notice.item[NOTICE].data))
669 if (notice.type != USAGE)
671 if (!notice.type)
672 notice.type = SPECIAL;
673 comment(¬ice, &buf, NiL, 1, 0);
674 comment(¬ice, &buf, NiL, 0, 0);
675 if (notice.item[PACKAGE].data)
678 expand(¬ice, &tmp, ¬ice.item[PACKAGE]);
680 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
682 if (notice.type >= OPEN)
684 copyright(¬ice, &tmp);
685 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
686 if (notice.type >= SPECIAL)
687 COMMENT(¬ice, &buf, "All Rights Reserved", 0);
689 if (notice.type == CPL || notice.type == EPL)
691 copy(&tmp, notice.item[PACKAGE].data ? "and" : "This software", -1);
693 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
694 if (notice.type == EPL)
698 if (notice.item[VERSION].data)
701 expand(¬ice, &tmp, ¬ice.item[VERSION]);
703 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
704 if (notice.item[CORPORATION].data || notice.item[COMPANY].data)
707 if (notice.item[PARENT].data)
709 expand(¬ice, &tmp, ¬ice.item[PARENT]);
712 if (notice.item[CORPORATION].data)
714 expand(¬ice, &tmp, ¬ice.item[CORPORATION]);
715 if (notice.item[INCORPORATION].data)
718 expand(¬ice, &tmp, ¬ice.item[INCORPORATION]);
721 else if (notice.item[COMPANY].data)
722 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
723 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
725 comment(¬ice, &buf, NiL, 0, 0);
726 COMMENT(¬ice, &buf, "A copy of the License is available at", 0);
727 if (notice.item[URL].data)
729 expand(¬ice, &tmp, ¬ice.item[URL]);
730 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
731 if (notice.item[URLMD5].data)
734 expand(¬ice, &tmp, ¬ice.item[URLMD5]);
736 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
739 else if (notice.type == EPL)
740 COMMENT(¬ice, &buf, "http://www.eclipse.org/org/documents/epl-v10.html", 0);
742 COMMENT(¬ice, &buf, "http://www.opensource.org/licenses/cpl", 0);
743 comment(¬ice, &buf, NiL, 0, 0);
745 else if (notice.type == OPEN)
747 copy(&tmp, notice.item[PACKAGE].data ? "and it" : "This software", -1);
749 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
750 if (notice.item[i = CORPORATION].data)
752 if (notice.item[PARENT].data)
754 expand(¬ice, &tmp, ¬ice.item[i = PARENT]);
757 expand(¬ice, &tmp, ¬ice.item[CORPORATION]);
758 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
760 else if (notice.item[i = COMPANY].data)
762 if (notice.item[PARENT].data)
764 expand(¬ice, &tmp, ¬ice.item[i = PARENT]);
767 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
768 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
772 if (notice.item[URL].data)
774 COMMENT(¬ice, &buf, "A copy of the Source Code Agreement is available", 0);
777 expand(¬ice, &tmp, ¬ice.item[i]);
779 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
780 comment(¬ice, &buf, NiL, 0, 0);
781 expand(¬ice, &tmp, ¬ice.item[URL]);
782 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
783 if (notice.item[URLMD5].data)
786 expand(¬ice, &tmp, ¬ice.item[URLMD5]);
788 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
790 comment(¬ice, &buf, NiL, 0, 0);
792 COMMENT(¬ice, &buf, "If you have copied or used this software without agreeing", 0);
793 COMMENT(¬ice, &buf, "to the terms of the license you are infringing on", 0);
794 COMMENT(¬ice, &buf, "the license and copyright and are violating", 0);
796 expand(¬ice, &tmp, ¬ice.item[i]);
799 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
803 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
804 comment(¬ice, &buf, NiL, 0, 0);
806 else if (notice.type == GPL)
808 comment(¬ice, &buf, NiL, 0, 0);
809 COMMENT(¬ice, &buf, "This is free software; you can redistribute it and/or", 0);
810 COMMENT(¬ice, &buf, "modify it under the terms of the GNU General Public License", 0);
811 COMMENT(¬ice, &buf, "as published by the Free Software Foundation;", 0);
812 COMMENT(¬ice, &buf, "either version 2, or (at your option) any later version.", 0);
813 comment(¬ice, &buf, NiL, 0, 0);
814 COMMENT(¬ice, &buf, "This software is distributed in the hope that it", 0);
815 COMMENT(¬ice, &buf, "will be useful, but WITHOUT ANY WARRANTY;", 0);
816 COMMENT(¬ice, &buf, "without even the implied warranty of MERCHANTABILITY", 0);
817 COMMENT(¬ice, &buf, "or FITNESS FOR A PARTICULAR PURPOSE.", 0);
818 COMMENT(¬ice, &buf, "See the GNU General Public License for more details.", 0);
819 comment(¬ice, &buf, NiL, 0, 0);
820 COMMENT(¬ice, &buf, "You should have received a copy of the", 0);
821 COMMENT(¬ice, &buf, "GNU General Public License", 0);
822 COMMENT(¬ice, &buf, "along with this software (see the file COPYING.)", 0);
823 COMMENT(¬ice, &buf, "If not, a copy is available at", 0);
824 COMMENT(¬ice, &buf, "http://www.gnu.org/copyleft/gpl.html", 0);
825 comment(¬ice, &buf, NiL, 0, 0);
827 else if (notice.type == BSD)
829 comment(¬ice, &buf, NiL, 0, 0);
830 COMMENT(¬ice, &buf, "Redistribution and use in source and binary forms, with or", -1);
831 COMMENT(¬ice, &buf, "without modification, are permitted provided that the following", -1);
832 COMMENT(¬ice, &buf, "conditions are met:", -1);
833 comment(¬ice, &buf, NiL, 0, 0);
834 COMMENT(¬ice, &buf, " 1. Redistributions of source code must retain the above", -1);
835 COMMENT(¬ice, &buf, " copyright notice, this list of conditions and the", -1);
836 COMMENT(¬ice, &buf, " following disclaimer.", -1);
837 comment(¬ice, &buf, NiL, 0, 0);
838 COMMENT(¬ice, &buf, " 2. Redistributions in binary form must reproduce the above", -1);
839 COMMENT(¬ice, &buf, " copyright notice, this list of conditions and the", -1);
840 COMMENT(¬ice, &buf, " following disclaimer in the documentation and/or other", -1);
841 COMMENT(¬ice, &buf, " materials provided with the distribution.", -1);
842 comment(¬ice, &buf, NiL, 0, 0);
844 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data || notice.item[i = COMPANY].data)
845 expand(¬ice, &tmp, ¬ice.item[i]);
849 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), -1);
850 COMMENT(¬ice, &buf, " names of its contributors may be used to endorse or", -1);
851 COMMENT(¬ice, &buf, " promote products derived from this software without", -1);
852 COMMENT(¬ice, &buf, " specific prior written permission.", -1);
853 comment(¬ice, &buf, NiL, 0, 0);
854 COMMENT(¬ice, &buf, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND", -1);
855 COMMENT(¬ice, &buf, "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,", -1);
856 COMMENT(¬ice, &buf, "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF", -1);
857 COMMENT(¬ice, &buf, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE", -1);
858 COMMENT(¬ice, &buf, "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS", -1);
859 COMMENT(¬ice, &buf, "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,", -1);
860 COMMENT(¬ice, &buf, "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED", -1);
861 COMMENT(¬ice, &buf, "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,", -1);
862 COMMENT(¬ice, &buf, "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON", -1);
863 COMMENT(¬ice, &buf, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,", -1);
864 COMMENT(¬ice, &buf, "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY", -1);
865 COMMENT(¬ice, &buf, "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE", -1);
866 COMMENT(¬ice, &buf, "POSSIBILITY OF SUCH DAMAGE.", -1);
867 comment(¬ice, &buf, NiL, 0, 0);
869 else if (notice.type == ZLIB)
871 comment(¬ice, &buf, NiL, 0, 0);
872 COMMENT(¬ice, &buf, "This software is provided 'as-is', without any express or implied", -1);
873 COMMENT(¬ice, &buf, "warranty. In no event will the authors be held liable for any", -1);
874 COMMENT(¬ice, &buf, "damages arising from the use of this software.", -1);
875 comment(¬ice, &buf, NiL, 0, 0);
876 COMMENT(¬ice, &buf, "Permission is granted to anyone to use this software for any", -1);
877 COMMENT(¬ice, &buf, "purpose, including commercial applications, and to alter it and", -1);
878 COMMENT(¬ice, &buf, "redistribute it freely, subject to the following restrictions:", -1);
879 comment(¬ice, &buf, NiL, 0, 0);
880 COMMENT(¬ice, &buf, " 1. The origin of this software must not be misrepresented;", -1);
881 COMMENT(¬ice, &buf, " you must not claim that you wrote the original software. If", -1);
882 COMMENT(¬ice, &buf, " you use this software in a product, an acknowledgment in the", -1);
883 COMMENT(¬ice, &buf, " product documentation would be appreciated but is not", -1);
884 COMMENT(¬ice, &buf, " required.", -1);
885 comment(¬ice, &buf, NiL, 0, 0);
886 COMMENT(¬ice, &buf, " 2. Altered source versions must be plainly marked as such,", -1);
887 COMMENT(¬ice, &buf, " and must not be misrepresented as being the original", -1);
888 COMMENT(¬ice, &buf, " software.", -1);
889 comment(¬ice, &buf, NiL, 0, 0);
890 COMMENT(¬ice, &buf, " 3. This notice may not be removed or altered from any source", -1);
891 COMMENT(¬ice, &buf, " distribution.", -1);
892 comment(¬ice, &buf, NiL, 0, 0);
894 else if (notice.type == MIT)
896 comment(¬ice, &buf, NiL, 0, 0);
897 COMMENT(¬ice, &buf, "Permission is hereby granted, free of charge, to any person", 0);
898 COMMENT(¬ice, &buf, "obtaining a copy of this software and associated", 0);
899 COMMENT(¬ice, &buf, "documentation files (the \"Software\"), to deal in the", 0);
900 COMMENT(¬ice, &buf, "Software without restriction, including without limitation", 0);
901 COMMENT(¬ice, &buf, "the rights to use, copy, modify, merge, publish, distribute,", 0);
902 COMMENT(¬ice, &buf, "sublicense, and/or sell copies of the Software, and to", 0);
903 COMMENT(¬ice, &buf, "permit persons to whom the Software is furnished to do so,", 0);
904 COMMENT(¬ice, &buf, "subject to the following conditions:", 0);
905 comment(¬ice, &buf, NiL, 0, 0);
906 COMMENT(¬ice, &buf, "The above copyright notice and this permission notice shall", 0);
907 COMMENT(¬ice, &buf, "be included in all copies or substantial portions of the", 0);
908 COMMENT(¬ice, &buf, "Software.", 0);
909 comment(¬ice, &buf, NiL, 0, 0);
910 COMMENT(¬ice, &buf, "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY", 0);
911 COMMENT(¬ice, &buf, "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE", 0);
912 COMMENT(¬ice, &buf, "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR", 0);
913 COMMENT(¬ice, &buf, "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS", 0);
914 COMMENT(¬ice, &buf, "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR", 0);
915 COMMENT(¬ice, &buf, "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR", 0);
916 COMMENT(¬ice, &buf, "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE", 0);
917 COMMENT(¬ice, &buf, "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", 0);
918 comment(¬ice, &buf, NiL, 0, 0);
922 if (notice.type == PROPRIETARY)
924 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data || notice.item[i = COMPANY].data)
926 expand(¬ice, &tmp, ¬ice.item[i]);
932 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
933 comment(¬ice, &buf, NiL, 0, 0);
934 if (notice.item[URL].data)
939 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
940 if (notice.item[PARENT].data)
942 expand(¬ice, &tmp, ¬ice.item[PARENT]);
945 if (notice.item[CORPORATION].data)
947 expand(¬ice, &tmp, ¬ice.item[CORPORATION]);
948 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
950 else if (notice.item[COMPANY].data)
952 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
953 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
961 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
962 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data)
963 expand(¬ice, &tmp, ¬ice.item[i]);
964 if (notice.item[COMPANY].data)
968 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
971 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 1);
972 COMMENT(¬ice, &buf, "and is not to be disclosed or used except in", 1);
973 COMMENT(¬ice, &buf, "accordance with applicable agreements", 1);
975 comment(¬ice, &buf, NiL, 0, 0);
977 else if (notice.type == NONEXCLUSIVE)
979 COMMENT(¬ice, &buf, "For nonexclusive individual use", 1);
980 comment(¬ice, &buf, NiL, 0, 0);
982 else if (notice.type == NONCOMMERCIAL)
984 COMMENT(¬ice, &buf, "For noncommercial use", 1);
985 comment(¬ice, &buf, NiL, 0, 0);
987 if (notice.type >= PROPRIETARY && !notice.item[URL].data)
989 COMMENT(¬ice, &buf, "Unpublished & Not for Publication", 0);
990 comment(¬ice, &buf, NiL, 0, 0);
992 if (notice.item[URL].data)
995 if (notice.item[CORPORATION].data || notice.item[COMPANY].data)
998 if ((notice.item[PARENT].size + (notice.item[CORPORATION].data ? (notice.item[CORPORATION].size + notice.item[INCORPORATION].size) : notice.item[COMPANY].size)) >= (COMLONG - 6))
999 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1002 if (notice.item[PARENT].data)
1004 expand(¬ice, &tmp, ¬ice.item[PARENT]);
1007 if (notice.item[CORPORATION].data)
1009 expand(¬ice, &tmp, ¬ice.item[CORPORATION]);
1010 if (notice.item[INCORPORATION].data)
1013 expand(¬ice, &tmp, ¬ice.item[INCORPORATION]);
1016 else if (notice.item[COMPANY].data)
1017 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
1019 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1020 COMMENT(¬ice, &buf, "under the terms and conditions of the license in", 0);
1021 expand(¬ice, &tmp, ¬ice.item[URL]);
1022 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1023 if (notice.item[URLMD5].data)
1026 expand(¬ice, &tmp, ¬ice.item[URLMD5]);
1028 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1030 comment(¬ice, &buf, NiL, 0, 0);
1032 else if (notice.type == PROPRIETARY)
1034 COMMENT(¬ice, &buf, "The copyright notice above does not evidence any", 0);
1035 COMMENT(¬ice, &buf, "actual or intended publication of such source code", 0);
1036 comment(¬ice, &buf, NiL, 0, 0);
1039 if (v = notice.item[NOTICE].data)
1041 x = v + notice.item[NOTICE].size;
1044 item.quote = notice.item[NOTICE].quote;
1056 expand(¬ice, &tmp, &item);
1057 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), h);
1060 comment(¬ice, &buf, NiL, 0, 0);
1062 if (notice.item[ORGANIZATION].data)
1064 expand(¬ice, &tmp, ¬ice.item[ORGANIZATION]);
1065 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1066 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data)
1067 expand(¬ice, &tmp, ¬ice.item[i]);
1068 if (notice.item[COMPANY].data)
1072 expand(¬ice, &tmp, ¬ice.item[COMPANY]);
1075 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1076 if (notice.item[LOCATION].data)
1078 expand(¬ice, &tmp, ¬ice.item[LOCATION]);
1079 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1081 comment(¬ice, &buf, NiL, 0, 0);
1084 if (v = notice.item[AUTHOR].data)
1086 x = v + notice.item[AUTHOR].size;
1088 k = q && notice.type != USAGE ? -1 : 0;
1100 item.quote = notice.item[AUTHOR].quote;
1103 for (i = 0; i < notice.ids; i++)
1104 if (q || item.size == notice.id[i].name.size && !strncmp(item.data, notice.id[i].name.data, item.size))
1107 if (notice.type == USAGE)
1110 expand(¬ice, &buf, ¬ice.id[i].value);
1117 COMMENT(¬ice, &buf, "CONTRIBUTORS", 0);
1118 comment(¬ice, &buf, NiL, 0, 0);
1121 expand(¬ice, &tmp, ¬ice.id[i].value);
1122 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1131 if (notice.type == USAGE)
1134 expand(¬ice, &buf, &item);
1141 COMMENT(¬ice, &buf, "CONTRIBUTORS", 0);
1142 comment(¬ice, &buf, NiL, 0, 0);
1145 expand(¬ice, &tmp, &item);
1146 comment(¬ice, &buf, BUF(&tmp), USE(&tmp), 0);
1151 comment(¬ice, &buf, NiL, 0, 0);
1153 if (notice.type == USAGE)
1156 copyright(¬ice, &buf);
1158 if (notice.item[URL].data)
1161 expand(¬ice, &buf, ¬ice.item[URL]);
1167 comment(¬ice, &buf, NiL, -1, 0);