• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ksh-20/ksh/src/lib/libast/port/

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