003 File Manager
Current Path:
/usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs
usr
/
src
/
cddl
/
contrib
/
opensolaris
/
cmd
/
dtrace
/
test
/
tst
/
common
/
funcs
/
📁
..
📄
err.D_FUNC_UNDEF.progenyofbad1.d
(1.11 KB)
📄
err.D_OP_VFPTR.badop.d
(1.13 KB)
📄
err.D_PROTO_ARG.chillbadarg.d
(1.09 KB)
📄
err.D_PROTO_ARG.copyoutbadarg.d
(1.14 KB)
📄
err.D_PROTO_ARG.mobadarg.d
(1.12 KB)
📄
err.D_PROTO_ARG.raisebadarg.d
(1.11 KB)
📄
err.D_PROTO_ARG.tolower.d
(932 B)
📄
err.D_PROTO_ARG.toupper.d
(934 B)
📄
err.D_PROTO_LEN.allocanoarg.d
(1.12 KB)
📄
err.D_PROTO_LEN.badbreakpoint.d
(1.12 KB)
📄
err.D_PROTO_LEN.chilltoofew.d
(1.08 KB)
📄
err.D_PROTO_LEN.chilltoomany.d
(1.1 KB)
📄
err.D_PROTO_LEN.copyoutstrbadarg.d
(1.13 KB)
📄
err.D_PROTO_LEN.copyoutstrtoofew.d
(1.14 KB)
📄
err.D_PROTO_LEN.copyouttoofew.d
(1.12 KB)
📄
err.D_PROTO_LEN.copyouttoomany.d
(1.19 KB)
📄
err.D_PROTO_LEN.motoofew.d
(1.12 KB)
📄
err.D_PROTO_LEN.motoomany.d
(1.14 KB)
📄
err.D_PROTO_LEN.mtabadarg.d
(1.14 KB)
📄
err.D_PROTO_LEN.mtatoofew.d
(1.15 KB)
📄
err.D_PROTO_LEN.mtatoomany.d
(1.17 KB)
📄
err.D_PROTO_LEN.panicbadarg.d
(1.11 KB)
📄
err.D_PROTO_LEN.progenyofbad2.d
(1.13 KB)
📄
err.D_PROTO_LEN.stopbadarg.d
(1.11 KB)
📄
err.D_PROTO_LEN.tolower.d
(925 B)
📄
err.D_PROTO_LEN.tolowertoomany.d
(948 B)
📄
err.D_PROTO_LEN.toupper.d
(925 B)
📄
err.D_PROTO_LEN.touppertoomany.d
(940 B)
📄
err.D_STRINGOF_TYPE.badstringof.d
(1.15 KB)
📄
err.D_VAR_UNDEF.badvar.d
(1.12 KB)
📄
err.badalloca.d
(1.25 KB)
📄
err.badalloca2.d
(1.2 KB)
📄
err.badbcopy.d
(1.32 KB)
📄
err.badbcopy1.d
(1.34 KB)
📄
err.badbcopy2.d
(1.28 KB)
📄
err.badbcopy3.d
(1.27 KB)
📄
err.badbcopy4.d
(1.33 KB)
📄
err.badbcopy5.d
(1.34 KB)
📄
err.badbcopy6.d
(1.04 KB)
📄
err.badchill.d
(1.03 KB)
📄
err.chillbadarg.ksh
(1.36 KB)
📄
err.copyout.d
(1.16 KB)
📄
err.copyoutbadaddr.ksh
(1.45 KB)
📄
err.copyoutstrbadaddr.ksh
(1.45 KB)
📄
err.inet_ntoa6badaddr.d
(1.08 KB)
📄
err.inet_ntoabadaddr.d
(1.07 KB)
📄
err.inet_ntopbadaddr.d
(1.08 KB)
📄
err.inet_ntopbadarg.d
(1.15 KB)
📄
tst.badfreopen.ksh
(1.95 KB)
📄
tst.basename.d
(2.94 KB)
📄
tst.basename.d.out
(4.78 KB)
📄
tst.bcopy.d
(1.42 KB)
📄
tst.chill.ksh
(1.46 KB)
📄
tst.cleanpath.d
(1.74 KB)
📄
tst.cleanpath.d.out
(767 B)
📄
tst.copyin.d
(1.66 KB)
📄
tst.copyinto.d
(1.52 KB)
📄
tst.ddi_pathname.d
(1.66 KB)
📄
tst.default.d
(1.16 KB)
📄
tst.freopen.ksh
(1.95 KB)
📄
tst.ftruncate.ksh
(1.26 KB)
📄
tst.ftruncate.ksh.out
(31 B)
📄
tst.hton.d
(2.03 KB)
📄
tst.index.d
(5.83 KB)
📄
tst.index.d.out
(33.71 KB)
📄
tst.inet_ntoa.d
(1.55 KB)
📄
tst.inet_ntoa.d.out
(48 B)
📄
tst.inet_ntoa6.d
(2.99 KB)
📄
tst.inet_ntoa6.d.out
(84 B)
📄
tst.inet_ntop.d
(4.39 KB)
📄
tst.inet_ntop.d.out
(180 B)
📄
tst.lltostr.d
(1.22 KB)
📄
tst.lltostr.d.out
(70 B)
📄
tst.lltostrbase.d
(1.36 KB)
📄
tst.lltostrbase.d.out
(13.46 KB)
📄
tst.mutex_owned.d
(1.55 KB)
📄
tst.mutex_owner.d
(1.34 KB)
📄
tst.mutex_type_adaptive.d
(1.51 KB)
📄
tst.progenyof.d
(1.48 KB)
📄
tst.rand.d
(1.12 KB)
📄
tst.strchr.d
(1.58 KB)
📄
tst.strchr.d.out
(203 B)
📄
tst.strjoin.d
(1.18 KB)
📄
tst.strjoin.d.out
(17 B)
📄
tst.strstr.d
(2.02 KB)
📄
tst.strstr.d.out
(437 B)
📄
tst.strtok.d
(2.5 KB)
📄
tst.strtok.d.out
(30 B)
📄
tst.strtok_null.d
(1.11 KB)
📄
tst.substr.d
(5 KB)
📄
tst.substr.d.out
(7.8 KB)
📄
tst.substrminate.d
(1.27 KB)
📄
tst.substrminate.d.out
(27 B)
📄
tst.system.d
(1.39 KB)
📄
tst.system.d.out
(430 B)
📄
tst.tolower.d
(1.46 KB)
📄
tst.toupper.d
(1.46 KB)
Editing: tst.substr.d
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" #pragma D option quiet #pragma D option strsize=32 struct { int index; int length; int nolen; int alt; } command[int]; int i; BEGIN { str = "foobarbazbop"; str2 = ""; altstr = "CRAIG: Positioned them, I don't "; altstr2 = "know... I'm fairly wide guy."; command[i].index = 3; command[i].nolen = 1; i++; command[i].index = 300; command[i].nolen = 1; i++; command[i].index = -10; command[i].nolen = 1; i++; command[i].index = 0; command[i].nolen = 1; i++; command[i].index = 1; command[i].nolen = 1; i++; command[i].index = strlen(str) - 1; command[i].nolen = 1; i++; command[i].index = strlen(str); command[i].nolen = 1; i++; command[i].index = strlen(str) + 1; command[i].nolen = 1; i++; command[i].index = 8; command[i].length = 20; i++; command[i].index = 4; command[i].length = 4; i++; command[i].index = 5; command[i].length = strlen(str) - command[i].index + 1; i++; command[i].index = 5; command[i].length = strlen(str) - command[i].index + 2; i++; command[i].index = 400; command[i].length = 20; i++; command[i].index = 400; command[i].length = 0; i++; command[i].index = 400; command[i].length = -1; i++; command[i].index = 3; command[i].length = 0; i++; command[i].index = 3; command[i].length = -1; i++; command[i].index = 3; command[i].length = -4; i++; command[i].index = 3; command[i].length = -20; i++; command[i].index = -10; command[i].length = -5; i++; command[i].index = 0; command[i].length = 400; i++; command[i].index = -1; command[i].length = 400; i++; command[i].index = -1; command[i].length = 0; i++; command[i].index = -1; command[i].length = -1; i++; command[i].index = -2 * strlen(str); command[i].length = 2 * strlen(str); i++; command[i].index = -2 * strlen(str); command[i].length = strlen(str); i++; command[i].index = -2 * strlen(str); command[i].length = strlen(str) + 1; i++; command[i].index = -1 * strlen(str); command[i].length = strlen(str); i++; command[i].index = -1 * strlen(str); command[i].length = strlen(str) - 1; i++; command[i].index = 100; command[i].length = 10; command[i].alt = 1; i++; command[i].index = 100; command[i].nolen = 1; command[i].alt = 1; i++; end = i; i = 0; printf("#!/usr/perl5/bin/perl\n\nBEGIN {\n"); } tick-1ms /i < end && command[i].nolen/ { this->str = command[i].alt ? altstr : str; this->str2 = command[i].alt ? altstr2 : str2; this->result = substr(command[i].alt ? "CRAIG: Positioned them, I don't know... I'm fairly wide guy." : str, command[i].index); printf("\tif (substr(\"%s%s\", %d) ne \"%s\") {\n", this->str, this->str2, command[i].index, this->result); printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d) = ", this->str, this->str2, command[i].index); printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d));\n", this->str, this->str2, command[i].index); printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d) = ", this->str, this->str2, command[i].index); printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result); printf("\t\t$failed++;\n"); printf("\t}\n\n"); } tick-1ms /i < end && !command[i].nolen/ { this->str = command[i].alt ? altstr : str; this->str2 = command[i].alt ? altstr2 : str2; this->result = substr(command[i].alt ? "CRAIG: Positioned them, I don't know... I'm fairly wide guy." : str, command[i].index, command[i].length); printf("\tif (substr(\"%s%s\", %d, %d) ne \"%s\") {\n", this->str, this->str2, command[i].index, command[i].length, this->result); printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d, %d) = ", this->str, this->str2, command[i].index, command[i].length); printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d, %d));\n", this->str, this->str2, command[i].index, command[i].length); printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d, %d) = ", this->str, this->str2, command[i].index, command[i].length); printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result); printf("\t\t$failed++;\n"); printf("\t}\n\n"); } tick-1ms /++i == end/ { printf("\texit($failed);\n}\n"); exit(0); }
Upload File
Create Folder