Found 19748 results in 577 files, showing top 150 files (show more).
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
727:   const DeclRefExpr *Needle;
56:   class UnreachableCodeHandler : public reachable_code::Callback {
125: class LogicalErrorHandler : public CFGCallback {
197:     // Skip function calls which are qualified with a templated class.
722: /// ContainsReference - A visitor class to search for references to
725: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
732:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
733:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
744:     if (E == Needle)
1033:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1500: class UninitValsDiagReporter : public UninitVariablesHandler {
1612: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1884: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
258:   // templated classes.
1420:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
591:   const DeclRefExpr *Needle;
62:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
179:     // Skip function calls which are qualified with a templated class.
586: /// ContainsReference - A visitor class to search for references to
589: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
596:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
597:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
608:     if (E == Needle)
899:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1360: class UninitValsDiagReporter : public UninitVariablesHandler {
1472: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1742: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
259:   // templated classes.
1280:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/superproject:external/clang/lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] Duplicate result
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
579:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
122: class LogicalErrorHandler : public CFGCallback {
203:         // Skip function calls which are qualified with a templated class.
574: /// ContainsReference - A visitor class to search for references to
577: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
582:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
584:       FoundReference(false), Needle(Needle) {}
595:     if (E == Needle)
888:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1325: class UninitValsDiagReporter : public UninitVariablesHandler {
1442: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1713: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
240:   // templated classes.
1251:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
577:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
192:         // Skip function calls which are qualified with a templated class.
572: /// ContainsReference - A visitor class to search for references to
575: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
580:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
582:       FoundReference(false), Needle(Needle) {}
593:     if (E == Needle)
885:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1331: class UninitValsDiagReporter : public UninitVariablesHandler {
1454: class ThreadSafetyReporter : public clang::thread_safety::ThreadSafetyHandler {
1629: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
229:   // templated classes.
1254:   // FIXME: Should we use a common classification enum and the same set of
github.com/google/rekall:rekall-gui/manuskript/static/bower_components/markdown/test/fixtures/Markdown-from-MDTest1.1.mdtest/Markdown_Documentation_-_Syntax.json: [ master, ]
15:         "class": "selected",
264:     ["pre", ["code", "    <div class=\"footer\">\u000a        &copy; 2004 Foo Corporation\u000a    </div>\u000a"]],
266:     ["pre", ["code", "<pre><code>&lt;div class=\"footer\"&gt;\u000a    &amp;copy; 2004 Foo Corporation\u000a&lt;/div&gt;\u000a</code></pre>\u000a"...(3 bytes skipped)...
149:     ["p", "in your anchor tag ", ["code", "href"], " attribute. Needless to say, this is easy to\u000aforget, and is probably the single most common source of HTML valida...(58 bytes skipped)...
chromium.googlesource.com/native_client/nacl-gdb:sim/common/sim-fpu.h: [ master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
chromium.googlesource.com/native_client/nacl-toolchain:gdb/sim/common/sim-fpu.h: [ master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
github.com/hanwen/artisjokke:needle2d/needle-inserter.hh: [ master, ]
13: class Needle_inserter : public Deformation_hook
2:   declare Needle_inserter
54:   Needle_inserter (Maubach_tree*, Deformation_state*);
github.com/hanwen/artisjokke:needle3d/needle-inserter3.hh: [ master, ]
10: class Needle_inserter3 : public Deformation_hook,  public Element_watcher
12:   enum Needle_state {
16:   Needle_state state_;
55:   Needle_inserter3 (Maubach_tree3*, Deformation_state*);
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:drivers/char/xillybus/xillybus_core.c: [ master, ]
61: static struct class *xillybus_class;
1843: 		device = device_create(xillybus_class,
1865: 		device_destroy(xillybus_class, MKDEV(major, i));
1881: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2082: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2083: 	if (IS_ERR(xillybus_class))
2084: 		return PTR_ERR(xillybus_class);
2088: 		class_destroy(xillybus_class);
2100: 	class_destroy(xillybus_class);
81:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/kmsan:drivers/char/xillybus/xillybus_core.c: [ master, ] Duplicate result
github.com/google/capsicum-linux:drivers/char/xillybus/xillybus_core.c: [ capsicum, ]
64: static struct class *xillybus_class;
1846: 		device = device_create(xillybus_class,
1868: 		device_destroy(xillybus_class, MKDEV(major, i));
1884: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2085: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2086: 	if (IS_ERR(xillybus_class))
2087: 		return PTR_ERR(xillybus_class);
2091: 		class_destroy(xillybus_class);
2103: 	class_destroy(xillybus_class);
84:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/ktsan:drivers/char/xillybus/xillybus_core.c: [ tsan, ]
64: static struct class *xillybus_class;
1844: 		device = device_create(xillybus_class,
1866: 		device_destroy(xillybus_class, MKDEV(major, i));
1882: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2083: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2084: 	if (IS_ERR(xillybus_class))
2085: 		return PTR_ERR(xillybus_class);
2089: 		class_destroy(xillybus_class);
2101: 	class_destroy(xillybus_class);
84:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/error-prone:check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java: [ master, ]
33: public final class NeedlemanWunschEditDistance {
35:   private NeedlemanWunschEditDistance() {
23:  * The Needleman-Wunsch algorithm for finding least-cost string edit distances between pairs of
29:  * <p>See http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
github.com/google/error-prone:check_api/src/test/java/com/google/errorprone/names/NeedlemanWunschEditDistanceTest.java: [ master, ]
27: public class NeedlemanWunschEditDistanceTest {
26: @RunWith(JUnit4.class)
25: /** Tests for NeedlemanWunschEditDistance */
34:         NeedlemanWunschEditDistance.getEditDistance(
47:         NeedlemanWunschEditDistance.getEditDistance(
62:         NeedlemanWunschEditDistance.getWorstCaseEditDistance(
github.com/gwtproject/gwt:user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java: [ master, ]
25: public class NeedlesslyAnnotatedLabel extends Label {
26:   @UiConstructor public NeedlesslyAnnotatedLabel() {
gwt.googlesource.com/gwt:user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java: [ master, ] Duplicate result
github.com/apache/kudu:www/epoch.0.5.2.min.js: [ master, ]
78: return this.drawNeedle()}};d.prototype.drawNeedle=function(){var c,a,d;d=[this.centerX(),this.centerY(),this.radius()];c=d[0];a=d[1];d=d[2];this.setS...(357 bytes skipped)...
24: ...(118 bytes skipped)...s.rightAxis())};d.prototype._drawAxes=function(){this.hasAxis("bottom")&&this.svg.append("g").attr("class...(48 bytes skipped)..., "+this.innerHeight()+")").call(this.bottomAxis());this.hasAxis("top")&&this.svg.append("g").attr("class","x axis top").call(this.topAxis());this.hasAxis("left")&&this.svg.append("g").attr("class","y axis left").call(this.leftAxis());
25: this.hasAxis("right")&&this.svg.append("g").attr("class","y axis right").attr("transform","translate("+this.innerWidth()+", 0)").call(this.rightAxis());ret...(64 bytes skipped)...
28: a.enter().append("g").attr("class",function(a){return a.className});a.append("path").attr("class","area").attr("d",function(a){return c(a.values)});return e.__super__.draw.call(this)};return e}(Ep...(29 bytes skipped)...
34: function(a){return"translate("+e(a.group)+", 0)"});a.enter().append("g").attr("class...(246 bytes skipped)...r("width",f.rangeBand()).attr("height",function(a){return c-t(a.y)});d.enter().append("rect").attr("class",function(a){return a.className}).attr("x",function(a){return f(a.label)}).attr("y",
36: e(a.group)+")"});a.enter().append("g").attr("class...(239 bytes skipped)...ttr("height",f.rangeBand()).attr("width",function(a){return d(a.y)});c.enter().append("rect").attr("class",function(a){return a.className}).attr("x",function(a){return 0}).attr("y",function(a){return f(a.label)}).attr("height",
39: ...(118 bytes skipped)...").transition().duration(500).attr("d",function(c){return a(c.values)});c.enter().append("g").attr("class",function(a){return a.className}).append("path").attr("class","line").attr("d",function(c){return a(c.values)});c.exit().transition().duration(750).style("opaci...(95 bytes skipped)...
41: ...(228 bytes skipped)...l(".arc").data(this.pie(this.data),function(a){return a.data.category});c.enter().append("g").attr("class",function(a){return"arc pie "+a.data.className});c.select("path").attr("d",this.arc);c.select("text").attr("transform",function(c){return"tran...(26 bytes skipped)...
44: ...(30 bytes skipped)....svg.selectAll(".layer").data(this.data,function(a){return a.category});a.enter().append("g").attr("class",function(a){return a.class...(102 bytes skipped)...,function(a){return h(a.x)}).attr("cy",function(a){return e(a.y)});c.enter().append("circle").attr("class","dot").attr("r",this.options.radius).attr("cx",function(a){return h(a.x)}).attr("cy",function(a){r...(67 bytes skipped)...
50: ...(102 bytes skipped)...Axes=function(){var a,c,d,e,f;this.hasAxis("bottom")&&(a=this.bottomAxis=this.svg.append("g").attr("class...(65 bytes skipped)...gins.left-1)+", "+(this.innerHeight()/this.pixelRatio+this.margins.top)+")"),a.append("path").attr("class...(33 bytes skipped)...s.innerWidth()/this.pixelRatio+1)));this.hasAxis("top")&&(a=this.topAxis=this.svg.append("g").attr("class",
51: ...(23 bytes skipped)...tr("transform","translate("+(this.margins.left-1)+", "+this.margins.top+")"),a.append("path").attr("class","domain").attr("d","M0,0H"+(this.innerWidth()/this.pixelRatio+1)));e=this.options.ticks.time;this....(287 bytes skipped)...
52: function(){this.hasAxis("left")&&this.svg.append("g").attr("class...(77 bytes skipped)...s.margins.top+")").call(this.leftAxis());if(this.hasAxis("right"))return this.svg.append("g").attr("class","y axis right").attr("transform","translate("+(this.width-this.margins.right)+", "+this.margins.to...(189 bytes skipped)...
59: ...(266 bytes skipped)...),opacity:d?0:1,enter:d?!0:!1,exit:!1},this.hasAxis("bottom")&&(a=this.bottomAxis.append("g").attr("class","tick major").attr("transform","translate("+(c.x+1)+",0)").style("opacity",c.opacity),a.append("li...(54 bytes skipped)...
60: ...(50 bytes skipped)...ats.bottom(c.time)),c.bottomEl=jQuery(a[0])),this.hasAxis("top")&&(a=this.topAxis.append("g").attr("class","tick major").attr("transform","translate("+(c.x+1)+",0)").style("opacity",c.opacity),a.append("li...(258 bytes skipped)...
73: ...(22 bytes skipped)...s.el.get(0)).insert("svg",":first-child").attr("width",this.width).attr("height",this.height).attr("class...(87 bytes skipped)....append("g").attr("transform","translate("+this.textX()+", "+this.textY()+")").append("text").attr("class","value").text(this.options.format(this.value));this.animation={interval:null,active:!1,delta:0,tar...(97 bytes skipped)...
2: ...(399 bytes skipped)...ice(0,h)],a.slice(h+1)):d.createElement(a));if(f)if("$"==y&&(y=m[++z]),"#"==f)p.id=y;else if(l=(a=p.className)&&
3: (" "+a+" ").replace(" "+y+" "," "),"."==f)p.class...(57 bytes skipped)...v",p,"<").innerHTML="":(A=p.parentNode)&&A.removeChild(p)}else l=l.substring(1,l.length-1),l!=a&&(p.className=l);k&&("$"==w&&(w=m[++z]),"style"==k?p.style.cssText=w:(f="!"==k.charAt(0)?(k=k.substring(1))&&...(191 bytes skipped)...
13: ...(14 bytes skipped)...=["layer"],h.push("category"+c),d.category=c,null!=d.label&&h.push(Epoch.Util.dasherize(d.label)),d.className=h.join(" "),c++;return this.data=a};a.prototype.update=function(a,c){null==c&&(c=!0);this.setDa...(294 bytes skipped)...
17: ...(397 bytes skipped)...=f.length;q<p;q++)l=f[q],n=l.tagName.toLowerCase(),null!=l.id&&0<l.id.length&&(n+="#"+l.id),null!=l.className&&
18: 0<l.className.length&&(n+="."+jQuery.trim(l.className).replace(/\s+/g,".")),d.push(n);d.push("svg");q=jQuery.trim(a).split(/\s+/);f=0;for(n=q.length;...(295 bytes skipped)...
32: ...(276 bytes skipped)...ion(){var a,c,d,e,f,t,l,y,n,q,p,k;f={};p=this.data;t=0;for(y=p.length;t<y;t++)for(e=p[t],a="bar "+e.className.replace(/\s*layer\s*/,""),k=e.values,l=0,n=k.length;l<n;l++)c=k[l],null==f[q=c.x]&&(f[q]=[]),f[...(28 bytes skipped)...
33: y:c.y,className:a});c=[];for(d in f)a=f[d],c.push({group:d,values:a});return c};d.prototype.draw=function(){"ho...(405 bytes skipped)...
49: ...(387 bytes skipped)...(c),c=["layer"],c.push("category"+((e|0)+1)),null!=f.label&&c.push(Epoch.Util.dasherize(f.label)),d.className=c.join(" "),
65: ...(249 bytes skipped)... k=e.__super__.constructor.apply(this,arguments)}f(e,d);e.prototype.setStyles=function(c){c=null!=c.className?this.getStyles("g."+c.className.replace(/\s/g,".")+" path.area"):this.getStyles("g path.area");this.ctx.fillStyle=c.fill;null!=...(32 bytes skipped)...
70: ...(286 bytes skipped)...A[0];p=A[1];x=this.data;B=[];A=0;for(z=x.length;A<z;A++)n=x[A],0<n.values.length&&(this.setStyles(n.className),w=[this.options.windowSize,n.values.length,this.inTransition()],t=w[0],k=w[1],l=(q=w[2])?-1:0,...(24 bytes skipped)...
86: ...(9 bytes skipped)...e<n;e++){q=p[e];l=q.values[a];z=l.buckets;for(d in z)f=z[d],B[d]+=f;C+=l.max;f=this.getStyles("."+q.className.split(" ").join(".")+" rect.bucket");l.color=f.fill;k.push(l)}q=c*A;this.p.clearRect(q,0,A,this...(302 bytes skipped)...
90: ...(272 bytes skipped)...0];m=d[1];q=this.data;p=[];y=0;for(n=q.length;y<n;y++)if(f=q[y],0<f.values.length){this.setStyles(f.className);this.ctx.beginPath();k=[this.options.windowSize,f.values.length,this.inTransition()];d=k[0];e=...(25 bytes skipped)...
github.com/googleglass/gdk-compass-sample:app/src/main/java/com/google/android/glass/sample/compass/CompassView.java: [ master, ]
341:     private void drawNeedle(Canvas canvas, boolean bottom) {
50: public class CompassView extends View {
217:         drawNeedle(canvas, false);
218:         drawNeedle(canvas, true);
github.com/bazelbuild/bazel:src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java: [ master, ]
143:   private Artifact classJar;
80:  * A helper class for android rules.
85: public class AndroidCommon {
186:         AnalysisUtils.getProviders(deps, AndroidNeverLinkLibrariesProvider.class)) {
193:           JavaInfo.getProvidersFromListOfTargets(JavaCompilationArgsProvider.class, deps)) {
365:       // Needle index is exhausted, so the needle must match.
400:         ruleContext.isLegalFragment(AndroidConfiguration.class)
401:             && ruleContext.getFragment(AndroidConfiguration.class).getExportsManifestDefault();
420:     // The resource class JAR should already have been generated.
430:     // We don't actually use the ijar. That is almost the same as the resource class jar
474:                       .getProvider(FileProvider.class)
710:             .addProvider(JavaCompilationArgsProvider.class, compilationArgsProvider)
711:             .addProvider(JavaRuleOutputJarsProvider.class, ruleOutputJarsProvider)
712:             .addProvider(JavaSourceJarsProvider.class, sourceJarsProvider)
713:             .addProvider(JavaPluginInfoProvider.class, JavaCommon.getTransitivePlugins(ruleContext))
720:             .getFragment(AndroidConfiguration.class)
737:         .addProvider(RunfilesProvider.class, RunfilesProvider.simple(getRunfiles()))
781:                 .getFragment(AndroidConfiguration.class)
857:     return context.getConfiguration().getFragment(AndroidConfiguration.class);
923:       FileProvider fileProvider = dep.getProvider(FileProvider.class);
940:    * into the same classloader. If the same class exists in both jars, there will be runtime
943:    * <p>R.class files that share the same package are also filtered out to prevent
958:             .addFileTypeToFilter(".class")
962:             .addExplicitFilter("/BR\\.class$")
963:             .addExplicitFilter("/databinding/[^/]+Binding\\.class$");
965:       builder.addExplicitFilter("R\\.class").addExplicitFilter("R\\$.*\\.class");
99:       RuleContext ruleContext, Mode mode, final Class<T> classType) {
104:         builder.add(ruleContext.getPrerequisites(attr, mode, classType));
207:       Artifact classesDex,
229:     commandLine.addPrefixedExecPath("--output=", classesDex);
237:             .addOutput(classesDex)
427:     // Add the compiled resource jar to the classpath of the main compilation.
429:     // Add the compiled resource jar to the classpath of consuming targets.
464:     classJar = ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_LIBRARY_CLASS_JAR);
465:     idlHelper = new AndroidIdlHelper(ruleContext, classJar);
525:       // Combined resource constants needs to come even before our own classes that may contain
562:     this.jarsProducedForRuntime = jarsProducedForRuntime.add(classJar).build();
604:       // We only want to add a jar to the classpath of a dependent rule if it has content.
605:       javaArtifactsBuilder.addRuntimeJar(classJar);
606:       jar = classJar;
609:     filesBuilder.add(classJar);
611:     outputs = helper.createOutputs(classJar);
673:     idlHelper.addTransitiveInfoProviders(builder, classJar, outputs.manifestProto());
691:             .addOutputJar(classJar, iJar, outputs.manifestProto(), ImmutableList.of(srcJar))
701:         builder, javaInfoBuilder, filesToBuild, classJar, ANDROID_COLLECTION_SPEC);
795:    * Returns Jars produced by this rule that may go into the runtime classpath. By contrast {@link
796:    * #getRuntimeJars()} returns the complete runtime classpath needed by this rule, including
804:     return classJar;
938:    * Used for instrumentation tests. Filter out classes from the instrumentation JAR that are also
467:     ImmutableList<Artifact> bootclasspath;
469:       bootclasspath =
473:                       .getPrerequisite("$desugar_java8_extra_bootclasspath", Mode.HOST)
479:       bootclasspath =
492:                 NestedSetBuilder.<Artifact>wrap(Order.NAIVE_LINK_ORDER, bootclasspath));
648:             helper.getBootclasspathOrDefault()));
android.googlesource.com/platform/external/jetbrains/jdk8u_nashorn:docs/JavaScriptingProgrammersGuide.html: [ master, ]
477: <a name="jsjavaclass" id=jsjavalass"></a>
26: <html class=" regenabled  gecko radius jsenabled regloaded" xmlns="http://www.w3.org/1999/xhtml"><head>
37: <div id="sharepage" class="smallpagetitle"><h1>Java Scripting Programmer's Guide</h1><div class="sharepage">		<div class...(272 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(146 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(213 bytes skipped)...guides%2Fscripting%2Fprogrammer_guide%2Findex.html;title=Java%20Scripting%20Programmer%27s%20Guide" class...(211 bytes skipped)...es%2Fscripting%2Fprogrammer_guide%2Findex.html&amp;title=Java%20Scripting%20Programmer%27s%20Guide" class...(198 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td>		<td id="share-blank"> </td></t...(36 bytes skipped)...
132: of the scripting API is the <code>ScriptEngineManager</code> class.
168: public class EvalScript {
171:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
173:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
175:         engine.<span class="methodref">eval</span>("print('Hello, World')");
194: public class EvalFile {
197:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
199:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
201:         engine.<span class="methodref">eval</span>(new java.io.FileReader(args[0]));
246: public class ScriptVars { 
253:         engine.<span class="methodref">put</span>("file", f);
277: public class InvokeScriptFunction {
290:         <span class="classref">Invocable</span> inv = (Invocable) engine;
293:         inv.<span class="methodref">invokeFunction</span>("hello", "Scripting!!" );
307: public class InvokeScriptMethod {
321:         <span class="classref">Invocable</span> inv = (Invocable) engine;
324:         Object obj = engine.<span class="methodref">get</span>("obj");
327:         inv.<span class="methodref">invokeMethod</span>(obj, "hello", "Script Method !!" );
348: public class RunnableImpl {
359:         <span class="classref">Invocable</span> inv = (Invocable) engine;
363:         Runnable r = inv.<span class="methodref">getInterface</span>(Runnable.class);
384: public class RunnableImplObject {
396:         Object obj = engine.<span class="methodref">get</span>("obj");
398:         <span class="classref">Invocable</span> inv = (Invocable) engine;
402:         Runnable r = inv.<span class="methodref">getInterface</span>(obj, Runnable.class);
434: public class MultiScopes {
445:         <span class="classref">ScriptContext</span> newContext = new <span class="classref">SimpleScriptContext</span>();
447:         <span class="classref">Bindings</span> engineScope = newContext.<span class="methodref">getBindings</span>(ScriptContext.ENGINE_SCOPE);
450:         engineScope.<span class="methodref">put</span>("x", "world");
504: In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
516: ...(2 bytes skipped)...th work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner class...(167 bytes skipped)... matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class...(8 bytes skipped)... out of all dots in the name. This way it can correctly resolve and load even multiply nested inner class...(33 bytes skipped)...this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
523: You can access both static and non-static inner classes. If you want to create an instance of a non-static inner class, remember to pass an instance of its outer class as the first argument to the constructor.
536: ...(64 bytes skipped)...rom a <code>java.lang.Class</code> object. You can obtain one from the other using properties <code>class</code> and <code>static</code> on them.
545:  print("Type's `class` property is same as instance getClass(): " + (a.getClass() === ArrayList.class))
549: You can think of the type object as similar to the class names as used in Java source code: you use them as the
553: between compile-time class expressions and runtime class objects also exists. (Also, Java can't have the equivalent of <code>static</code>
554: property on a <code>Class</code> object since compile-time class expressions are never reified as objects).
570: <span class="functionref">importPackage</span>(java.awt);
572: <span class="functionref">importClass</span>(java.awt.Frame);
581: <p>The <span class="objectref">Packages</span> global variable can
593: avoid that, you may use <span class="functionref">JavaImporter</span>.</p>
600: var SwingGui = new <span class="functionref">JavaImporter</span>(javax.swing,
660: Java anonymous class-like syntax:</p>
695: If a Java class is abstract, you can instantiate an anonymous subclass of it using an argument list that is applicable to any of its public or protected constructors, but...(230 bytes skipped)...
713: which is very similar to Java anonymous inner class definition. On the other hand, if the type is an abstract type with a single abstract method (commo...(210 bytes skipped)...
720: Note that in every one of these cases if you are trying to instantiate an abstract class that has constructors that take some arguments, you can invoke those simply by specifying the argum...(57 bytes skipped)...
736: To extend a concrete Java class, you have to use <code>Java.extend</code> function.
737: <code>Java.extend</code> returns a type object for a subclass of the specified Java class (or implementation of the specified interface) that acts as a script-to-Java adapter for it.  
775: ...(2 bytes skipped)...ode>Java.extend</code> can in fact take a list of multiple types. At most one of the types can be a class, and the rest must
776: be interfaces (the class doesn't have to be the first in the list). You will get back an object that extends the class and 
777: implements all the interfaces. (Obviously, if you only specify interfaces and no class, the object will extend <code>java.lang.Object</code>).
785: to the actual instance being created with <code>new</code>, and not to the whole class. This has some advantages, for example in the
787: ...(8 bytes skipped)...ty, the below code shows that different instantiations of, say, <code>Runnable</code> have the same class regardless of them having
796: print("We share the same class: " + (r1.class === r2.class))
804: We share the same class: true
807: Sometimes, however, you'll want to extend a Java class or implement an interface with implementation bound to the class, not to
808: its instances. Such a need arises, for example, when you need to pass the class for instantiation to an external API; prime example
809: of this is the JavaFX framework where you need to pass an Application class to the FX API and let it instantiate it.
813: denoting a class to extend and interfaces to implement &ndash; can also take one last argument that has to be a Java...(13 bytes skipped)...
814: ...(6 bytes skipped)...erves as the implementation for the methods. In this case, <code>Java.extend()</code> will create a class that has the same
815: constructors as the original class had, as they don't need to take an an extra implementation object parameter. The example below
816: shows how you can create class-bound implementations, and shows that in this case, the implementation classes for different invocations
826: print("We share the same class: " + (r1.class === r2.class))
834: We share the same class: false
839: the implementations are bound to a class, the two classes obviously can't be the same, and we indeed see that the two runnables no
840: longer share the same class &ndash; every invocation of <code>Java.extend()</code> with a class-specific implementation object triggers
841: the creation of a new Java adapter class.
844: Finally, the adapter classes with class-bound implementations can <i>still</i> take an additional constructor parameter to further
846: in a class-based JavaScript implementation object passed to <code>Java.extend</code>, and part in another obje...(29 bytes skipped)...
847: ...(0 bytes skipped)...Whatever functions are provided by the constructor-passed object will override the functions in the class-bound object.
855: print("We share the same class: " + (r1.class === r2.class))
863: We share the same class: true
891: Note that you normally don't even have to use qualified class names in 
897: class.
929: end up with an object of private engine implementation class that implements <code>CharSequence</code> but is not a Java String.
938: abstract class <code>javax.script.AbstractScriptEngine</code>
957: <div class="hr"><hr></div>
973: <div class="hr"><hr></div>
66: <li><span><a href="#jsjavaclass">Accessing Java
80: <li><span><a href="#classBoundImplementations">Class-Bound Implementations
161: Needless to say, you have to handle the exceptions
468: <p>For the most part, accessing Java classes, objects and methods
527: static fields and methods of the classes:
561: classes.</p>
564: // <a href="source/importpackageclass.js">importpackageclass.js</a>
568: // Import Java packages and classes 
587: platform classes can be accessed without the "Packages" prefix.</p>
598: // create JavaImporter with specific packages and classes to import
606:     // classes by unqualified (simple) names.
730: ...(35 bytes skipped)... expects a <code>TimerTask</code> as its argument, so Nashorn creates an instance of a TimerTask subclass and uses the passed function to implement its only abstract method, run(). In this usage though, yo...(130 bytes skipped)...
760: The reason you must use <code>Java.extend()</code> with concrete classes is that with concrete classes, there can be a 
767: If we allowed subclassing of concrete classes with constructor syntax, Nashorn couldn't tell if you're creating a new 
779: <a name="classBoundImplementations" id="classBoundImplementations"></a>
782: The methods shown so far for extending Java classes and implementing interfaces &ndash; passing an implementation JavaScript object 
783: ...(6 bytes skipped)...ction to a constructor, or using <code>Java.extend</code> with <code>new</code> &ndash; all produce classes that take an
768: <code>Thread</code> and passing it a <code>Runnable</code> at this point, or you are subclassing <code>Thread</code> and
github.com/chromium/chromium:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ]
266: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
348: class MouseLockModule : public pp::Module {
216:   DrawNeedle(&image, kForegroundColor);
269:     Log("DrawNeedle with NULL image");
chromium.googlesource.com/chromium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/IoT-Icebreaker:appengine/sensordata-to-ui/public/third_party/epoch/epoch.js: [ master, ]
3412:   Gauge.prototype.drawNeedle = function() {
1661:       this.g.append("g").attr("class", "x axis bottom").attr("transform", "translate(0, " + (this.innerHeight()) + ")").call(this.bottom...(8 bytes skipped)...
1664:       this.g.append("g").attr('class', 'x axis top').call(this.topAxis());
1667:       this.g.append("g").attr("class", "y axis left").call(this.leftAxis());
1670:       this.g.append('g').attr('class', 'y axis right').attr('transform', "translate(" + (this.innerWidth()) + ", 0)").call(this.rightAxi...(5 bytes skipped)...
1802:     layer.enter().append('g').attr('class', function(d) {
1805:     layer.append('path').attr('class', 'area').attr('d', function(d) {
1985:     layer.enter().append("g").attr('class', 'layer').attr("transform", function(d) {
1991:     rects.attr('class', function(d) {
2001:     rects.enter().append('rect').attr('class', function(d) {
2026:     layer.enter().append("g").attr('class', 'layer').attr("transform", function(d) {
2032:     rects.attr('class', function(d) {
2042:     rects.enter().append('rect').attr('class', function(d) {
2270:     layer.enter().append('g').attr('class', function(l) {
2272:     }).append('path').attr('class', 'line').attr('d', (function(_this) {
2326:     arcs.enter().append('g').attr('class', function(d) {
2393:     layer.enter().append('g').attr('class', function(d) {
2407:     dots.enter().append('circle').attr('class', 'dot').attr("r", function(d) {
2582:       axis = this.bottomAxis = this.svg.append('g').attr('class', "x axis bottom canvas").attr('transform', "translate(" + (this.margins.left - 1) + ", " + (this.i...(58 bytes skipped)...
2583:       axis.append('path').attr('class', 'domain').attr('d', "M0,0H" + (this.innerWidth() / this.pixelRatio + 1));
2586:       axis = this.topAxis = this.svg.append('g').attr('class', "x axis top canvas").attr('transform', "translate(" + (this.margins.left - 1) + ", " + this.margi...(14 bytes skipped)...
2587:       axis.append('path').attr('class', 'domain').attr('d', "M0,0H" + (this.innerWidth() / this.pixelRatio + 1));
2623:       this.svg.append("g").attr("class", "y axis left").attr('transform', "translate(" + (this.margins.left - 1) + ", " + this.margins.top...(30 bytes skipped)...
2626:       return this.svg.append('g').attr('class', 'y axis right').attr('transform', "translate(" + (this.width - this.margins.right) + ", " + this....(42 bytes skipped)...
2844:       g = this.bottomAxis.append('g').attr('class', 'tick major').attr('transform', "translate(" + (tick.x + 1) + ",0)").style('opacity', tick.opacit...(3 bytes skipped)...
2850:       g = this.topAxis.append('g').attr('class', 'tick major').attr('transform', "translate(" + (tick.x + 1) + ",0)").style('opacity', tick.opacit...(3 bytes skipped)...
3297: ...(13 bytes skipped)...= this.el.insert('svg', ':first-child').attr('width', this.width).attr('height', this.height).attr('class', 'gauge-labels');
3302: ...(25 bytes skipped)...attr('transform', "translate(" + (this.textX()) + ", " + (this.textY()) + ")").append('text').attr('class', 'value').text(this.options.format(this.value));
585:     var category, classes, i, layer, len;
589:       classes = ['layer'];
590:       classes.push("category" + category);
594:         classes.push(Epoch.Util.dasherize(layer.label));
596:       layer.className = classes.join(' ');
872:     var classNames, element, id, match, tag, whole;
877:     whole = match[0], tag = match[1], id = match[2], classNames = match[3];
883:     if (classNames != null) {
884:       element.className = classNames.substr(1).replace(/\./g, ' ');
945:       if ((element.className != null) && element.className.length > 0) {
946:         sel += '.' + Epoch.Util.trim(element.className).replace(/\s+/g, '.');
1803:       return d.className;
1933:     var className, entry, j, k, l, layer, len, len1, map, name, ref, ref1, results, v;
1938:       className = 'bar ' + layer.className.replace(/\s*layer\s*/, '');
1948:           className: className
1992:       return d.className;
2002:       return d.className;
2033:       return d.className;
2043:       return d.className;
2271:       return l.className;
2327:       return "arc pie " + d.data.className;
2394:       return d.className;
2555:     var classes, copy, data, i, layer, start;
2563:       classes = ['layer'];
2564:       classes.push("category" + ((i | 0) + 1));
2566:         classes.push(Epoch.Util.dasherize(layer.label));
2568:       copy.className = classes.join(' ');
3089:     if ((layer != null) && (layer.className != null)) {
3090:       styles = this.getStyles("g." + (layer.className.replace(/\s/g, '.')) + " path.area");
3209:   Bar.prototype.setStyles = function(className) {
3211:     styles = this.getStyles("rect.bar." + (className.replace(/\s/g, '.')));
3236:       this.setStyles(layer.className);
3408:     this.drawNeedle();
3668:       styles = this.getStyles("." + (layer.className.split(' ').join('.')) + " rect.bucket");
3786:   Line.prototype.setStyles = function(className) {
3788:     styles = this.getStyles("g." + (className.replace(/\s/g, '.')) + " path.line");
3807:       this.setStyles(layer.className);
chromium.googlesource.com/chromium:native_client_sdk/src/examples/mouselock/mouselock.cc: [ trunk, ]
241: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
324: class MouseLockModule : public pp::Module {
193:   DrawNeedle(&image, foreground_color);
244:     Log("DrawNeedle with NULL image");
chromium.googlesource.com/git/chromium:native_client_sdk/src/examples/mouselock/mouselock.cc: [ trunk, ] Duplicate result
chromium.googlesource.com/chromium/chromium:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ trunk, ] Duplicate result
chromium.googlesource.com/dart/dartium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/android/external/chromium_org/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
github.com/google/pepper.js:examples/mouselock/mouselock.cc: [ master, ]
268: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
355: class MouseLockModule : public pp::Module {
217:   DrawNeedle(&image, kForegroundColor);
271:     Log("DrawNeedle with NULL image");
android.googlesource.com/platform/external/jetbrains/JetBrainsRuntime:doc/nashorn/JavaScriptingProgrammersGuide.html: [ master, ]
477: <a name="jsjavaclass" id=jsjavalass"></a>
26: <html class=" regenabled  gecko radius jsenabled regloaded" xmlns="http://www.w3.org/1999/xhtml"><head>
37: <div id="sharepage" class="smallpagetitle"><h1>Java Scripting Programmer's Guide</h1><div class="sharepage">		<div class...(272 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(146 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(213 bytes skipped)...guides%2Fscripting%2Fprogrammer_guide%2Findex.html;title=Java%20Scripting%20Programmer%27s%20Guide" class...(211 bytes skipped)...es%2Fscripting%2Fprogrammer_guide%2Findex.html&amp;title=Java%20Scripting%20Programmer%27s%20Guide" class...(198 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td>		<td id="share-blank"> </td></t...(36 bytes skipped)...
132: of the scripting API is the <code>ScriptEngineManager</code> class.
168: public class EvalScript {
171:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
173:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
175:         engine.<span class="methodref">eval</span>("print('Hello, World')");
194: public class EvalFile {
197:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
199:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
201:         engine.<span class="methodref">eval</span>(new java.io.FileReader(args[0]));
246: public class ScriptVars { 
253:         engine.<span class="methodref">put</span>("file", f);
277: public class InvokeScriptFunction {
290:         <span class="classref">Invocable</span> inv = (Invocable) engine;
293:         inv.<span class="methodref">invokeFunction</span>("hello", "Scripting!!" );
307: public class InvokeScriptMethod {
321:         <span class="classref">Invocable</span> inv = (Invocable) engine;
324:         Object obj = engine.<span class="methodref">get</span>("obj");
327:         inv.<span class="methodref">invokeMethod</span>(obj, "hello", "Script Method !!" );
348: public class RunnableImpl {
359:         <span class="classref">Invocable</span> inv = (Invocable) engine;
363:         Runnable r = inv.<span class="methodref">getInterface</span>(Runnable.class);
384: public class RunnableImplObject {
396:         Object obj = engine.<span class="methodref">get</span>("obj");
398:         <span class="classref">Invocable</span> inv = (Invocable) engine;
402:         Runnable r = inv.<span class="methodref">getInterface</span>(obj, Runnable.class);
434: public class MultiScopes {
445:         <span class="classref">ScriptContext</span> newContext = new <span class="classref">SimpleScriptContext</span>();
447:         <span class="classref">Bindings</span> engineScope = newContext.<span class="methodref">getBindings</span>(ScriptContext.ENGINE_SCOPE);
450:         engineScope.<span class="methodref">put</span>("x", "world");
504: In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
516: ...(2 bytes skipped)...th work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner class...(167 bytes skipped)... matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class...(8 bytes skipped)... out of all dots in the name. This way it can correctly resolve and load even multiply nested inner class...(33 bytes skipped)...this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
523: You can access both static and non-static inner classes. If you want to create an instance of a non-static inner class, remember to pass an instance of its outer class as the first argument to the constructor.
536: ...(64 bytes skipped)...rom a <code>java.lang.Class</code> object. You can obtain one from the other using properties <code>class</code> and <code>static</code> on them.
545:  print("Type's `class` property is same as instance getClass(): " + (a.getClass() === ArrayList.class))
549: You can think of the type object as similar to the class names as used in Java source code: you use them as the
553: between compile-time class expressions and runtime class objects also exists. (Also, Java can't have the equivalent of <code>static</code>
554: property on a <code>Class</code> object since compile-time class expressions are never reified as objects).
570: <span class="functionref">importPackage</span>(java.awt);
572: <span class="functionref">importClass</span>(java.awt.Frame);
581: <p>The <span class="objectref">Packages</span> global variable can
593: avoid that, you may use <span class="functionref">JavaImporter</span>.</p>
600: var SwingGui = new <span class="functionref">JavaImporter</span>(javax.swing,
660: Java anonymous class-like syntax:</p>
695: If a Java class is abstract, you can instantiate an anonymous subclass of it using an argument list that is applicable to any of its public or protected constructors, but...(230 bytes skipped)...
713: which is very similar to Java anonymous inner class definition. On the other hand, if the type is an abstract type with a single abstract method (commo...(210 bytes skipped)...
720: Note that in every one of these cases if you are trying to instantiate an abstract class that has constructors that take some arguments, you can invoke those simply by specifying the argum...(57 bytes skipped)...
736: To extend a concrete Java class, you have to use <code>Java.extend</code> function.
737: <code>Java.extend</code> returns a type object for a subclass of the specified Java class (or implementation of the specified interface) that acts as a script-to-Java adapter for it.  
775: ...(2 bytes skipped)...ode>Java.extend</code> can in fact take a list of multiple types. At most one of the types can be a class, and the rest must
776: be interfaces (the class doesn't have to be the first in the list). You will get back an object that extends the class and 
777: implements all the interfaces. (Obviously, if you only specify interfaces and no class, the object will extend <code>java.lang.Object</code>).
785: to the actual instance being created with <code>new</code>, and not to the whole class. This has some advantages, for example in the
787: ...(8 bytes skipped)...ty, the below code shows that different instantiations of, say, <code>Runnable</code> have the same class regardless of them having
796: print("We share the same class: " + (r1.class === r2.class))
804: We share the same class: true
807: Sometimes, however, you'll want to extend a Java class or implement an interface with implementation bound to the class, not to
808: its instances. Such a need arises, for example, when you need to pass the class for instantiation to an external API; prime example
809: of this is the JavaFX framework where you need to pass an Application class to the FX API and let it instantiate it.
813: denoting a class to extend and interfaces to implement &ndash; can also take one last argument that has to be a Java...(13 bytes skipped)...
814: ...(6 bytes skipped)...erves as the implementation for the methods. In this case, <code>Java.extend()</code> will create a class that has the same
815: constructors as the original class had, as they don't need to take an an extra implementation object parameter. The example below
816: shows how you can create class-bound implementations, and shows that in this case, the implementation classes for different invocations
826: print("We share the same class: " + (r1.class === r2.class))
834: We share the same class: false
839: the implementations are bound to a class, the two classes obviously can't be the same, and we indeed see that the two runnables no
840: longer share the same class &ndash; every invocation of <code>Java.extend()</code> with a class-specific implementation object triggers
841: the creation of a new Java adapter class.
844: Finally, the adapter classes with class-bound implementations can <i>still</i> take an additional constructor parameter to further
846: in a class-based JavaScript implementation object passed to <code>Java.extend</code>, and part in another obje...(29 bytes skipped)...
847: ...(0 bytes skipped)...Whatever functions are provided by the constructor-passed object will override the functions in the class-bound object.
855: print("We share the same class: " + (r1.class === r2.class))
863: We share the same class: true
891: Note that you normally don't even have to use qualified class names in 
897: class.
929: end up with an object of private engine implementation class that implements <code>CharSequence</code> but is not a Java String.
938: abstract class <code>javax.script.AbstractScriptEngine</code>
957: <div class="hr"><hr></div>
973: <div class="hr"><hr></div>
66: <li><span><a href="#jsjavaclass">Accessing Java
80: <li><span><a href="#classBoundImplementations">Class-Bound Implementations
161: Needless to say, you have to handle the exceptions
468: <p>For the most part, accessing Java classes, objects and methods
527: static fields and methods of the classes:
561: classes.</p>
564: // <a href="source/importpackageclass.js">importpackageclass.js</a>
568: // Import Java packages and classes 
587: platform classes can be accessed without the "Packages" prefix.</p>
598: // create JavaImporter with specific packages and classes to import
606:     // classes by unqualified (simple) names.
730: ...(35 bytes skipped)... expects a <code>TimerTask</code> as its argument, so Nashorn creates an instance of a TimerTask subclass and uses the passed function to implement its only abstract method, run(). In this usage though, yo...(130 bytes skipped)...
760: The reason you must use <code>Java.extend()</code> with concrete classes is that with concrete classes, there can be a 
767: If we allowed subclassing of concrete classes with constructor syntax, Nashorn couldn't tell if you're creating a new 
779: <a name="classBoundImplementations" id="classBoundImplementations"></a>
782: The methods shown so far for extending Java classes and implementing interfaces &ndash; passing an implementation JavaScript object 
783: ...(6 bytes skipped)...ction to a constructor, or using <code>Java.extend</code> with <code>new</code> &ndash; all produce classes that take an
768: <code>Thread</code> and passing it a <code>Runnable</code> at this point, or you are subclassing <code>Thread</code> and
github.com/chromium/chromium:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ]
105:     _updateGaugeNeedle: function (rpm) {
36:         this._updateGaugeNeedle(results.mean);
215:     currentSectionElement.classList.remove('selected');
216:     newSectionElement.classList.add('selected');
109:         var gaugeNeedleElement = document.querySelector('#summarized-results > .gauge .needle');
110:         gaugeNeedleElement.style.setProperty('-webkit-transform', needleRotationValue);
111:         gaugeNeedleElement.style.setProperty('-moz-transform', needleRotationValue);
112:         gaugeNeedleElement.style.setProperty('-ms-transform', needleRotationValue);
113:         gaugeNeedleElement.style.setProperty('transform', needleRotationValue);
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/third_party:blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:drivers/net/can/m_can/m_can.c: [ master, ]
1754: int m_can_class_get_clocks(struct m_can_classdev *m_can_dev)
1770: struct m_can_classdev *m_can_class_allocate_dev(struct device *dev)
1815: int m_can_class_register(struct m_can_classdev *m_can_dev)
1860: int m_can_class_suspend(struct device *dev)
1880: int m_can_class_resume(struct device *dev)
1906: void m_can_class_unregister(struct m_can_classdev *m_can_dev)
1768: EXPORT_SYMBOL_GPL(m_can_class_get_clocks);
1772: 	struct m_can_classdev *class_dev = NULL;
1793: 	net_dev = alloc_candev(sizeof(*class_dev), tx_fifo_size);
1799: 	class_dev = netdev_priv(net_dev);
1800: 	if (!class_dev) {
1805: 	class_dev->net = net_dev;
1806: 	class_dev->dev = dev;
1809: 	m_can_of_parse_mram(class_dev, mram_config_vals);
1811: 	return class_dev;
1813: EXPORT_SYMBOL_GPL(m_can_class_allocate_dev);
1858: EXPORT_SYMBOL_GPL(m_can_class_register);
1878: EXPORT_SYMBOL_GPL(m_can_class_suspend);
1904: EXPORT_SYMBOL_GPL(m_can_class_resume);
1914: EXPORT_SYMBOL_GPL(m_can_class_unregister);
324: static inline u32 m_can_read(struct m_can_classdev *cdev, enum m_can_reg reg)
329: static inline void m_can_write(struct m_can_classdev *cdev, enum m_can_reg reg,
335: static u32 m_can_fifo_read(struct m_can_classdev *cdev,
344: static void m_can_fifo_write(struct m_can_classdev *cdev,
353: static inline void m_can_fifo_write_no_off(struct m_can_classdev *cdev,
359: static u32 m_can_txe_fifo_read(struct m_can_classdev *cdev, u32 fgi, u32 offset)
367: static inline bool m_can_tx_fifo_full(struct m_can_classdev *cdev)
372: void m_can_config_endisable(struct m_can_classdev *cdev, bool enable)
410: static inline void m_can_enable_all_interrupts(struct m_can_classdev *cdev)
416: static inline void m_can_disable_all_interrupts(struct m_can_classdev *cdev)
423: 	struct m_can_classdev *cdev = netdev_priv(net);
441: 	struct m_can_classdev *cdev = netdev_priv(dev);
498: 	struct m_can_classdev *cdev = netdev_priv(dev);
551: 	struct m_can_classdev *cdev = netdev_priv(dev);
608: 	struct m_can_classdev *cdev = netdev_priv(dev);
618: static int m_can_clk_start(struct m_can_classdev *cdev)
634: static void m_can_clk_stop(struct m_can_classdev *cdev)
643: 	struct m_can_classdev *cdev = netdev_priv(dev);
660: 	struct m_can_classdev *cdev = netdev_priv(dev);
734: 	struct m_can_classdev *cdev = netdev_priv(dev);
789: 	struct m_can_classdev *cdev = netdev_priv(dev);
821: 	struct m_can_classdev *cdev = netdev_priv(dev);
845: 	struct m_can_classdev *cdev = netdev_priv(dev);
853: 	/* Errata workaround for issue "Needless activation of MRAF irq"
890: 	struct m_can_classdev *cdev = netdev_priv(dev);
902: 	struct m_can_classdev *cdev = netdev_priv(dev);
922: 	struct m_can_classdev *cdev = netdev_priv(dev);
955: 	struct m_can_classdev *cdev = netdev_priv(dev);
1056: 	struct m_can_classdev *cdev = netdev_priv(dev);
1129: 	struct m_can_classdev *cdev = netdev_priv(dev);
1245: 	struct m_can_classdev *cdev = netdev_priv(dev);
1275: static int m_can_check_core_release(struct m_can_classdev *cdev)
1303: static bool m_can_niso_supported(struct m_can_classdev *cdev)
1334: static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
1412: 	struct m_can_classdev *cdev = netdev_priv(dev);
1423: 	struct m_can_classdev *cdev = netdev_priv(dev);
1448: 	struct m_can_classdev *cdev = netdev_priv(dev);
1460: static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
1581: 	struct m_can_classdev *cdev = container_of(ws, struct m_can_classdev,
1591: 	struct m_can_classdev *cdev = netdev_priv(dev);
1624: 	struct m_can_classdev *cdev = netdev_priv(dev);
1700: static void m_can_of_parse_mram(struct m_can_classdev *cdev,
1738: void m_can_init_ram(struct m_can_classdev *cdev)
1863: 	struct m_can_classdev *cdev = netdev_priv(ndev);
1883: 	struct m_can_classdev *cdev = netdev_priv(ndev);
github.com/google/kmsan:drivers/net/can/m_can/m_can.c: [ master, ]
1706: int m_can_class_get_clocks(struct m_can_classdev *m_can_dev)
1722: struct m_can_classdev *m_can_class_allocate_dev(struct device *dev)
1767: int m_can_class_register(struct m_can_classdev *m_can_dev)
1812: int m_can_class_suspend(struct device *dev)
1832: int m_can_class_resume(struct device *dev)
1858: void m_can_class_unregister(struct m_can_classdev *m_can_dev)
1720: EXPORT_SYMBOL_GPL(m_can_class_get_clocks);
1724: 	struct m_can_classdev *class_dev = NULL;
1745: 	net_dev = alloc_candev(sizeof(*class_dev), tx_fifo_size);
1751: 	class_dev = netdev_priv(net_dev);
1752: 	if (!class_dev) {
1757: 	class_dev->net = net_dev;
1758: 	class_dev->dev = dev;
1761: 	m_can_of_parse_mram(class_dev, mram_config_vals);
1763: 	return class_dev;
1765: EXPORT_SYMBOL_GPL(m_can_class_allocate_dev);
1810: EXPORT_SYMBOL_GPL(m_can_class_register);
1830: EXPORT_SYMBOL_GPL(m_can_class_suspend);
1856: EXPORT_SYMBOL_GPL(m_can_class_resume);
1866: EXPORT_SYMBOL_GPL(m_can_class_unregister);
323: static inline u32 m_can_read(struct m_can_classdev *cdev, enum m_can_reg reg)
328: static inline void m_can_write(struct m_can_classdev *cdev, enum m_can_reg reg,
334: static u32 m_can_fifo_read(struct m_can_classdev *cdev,
343: static void m_can_fifo_write(struct m_can_classdev *cdev,
352: static inline void m_can_fifo_write_no_off(struct m_can_classdev *cdev,
358: static u32 m_can_txe_fifo_read(struct m_can_classdev *cdev, u32 fgi, u32 offset)
366: static inline bool m_can_tx_fifo_full(struct m_can_classdev *cdev)
371: void m_can_config_endisable(struct m_can_classdev *cdev, bool enable)
409: static inline void m_can_enable_all_interrupts(struct m_can_classdev *cdev)
415: static inline void m_can_disable_all_interrupts(struct m_can_classdev *cdev)
422: 	struct m_can_classdev *cdev = netdev_priv(net);
440: 	struct m_can_classdev *cdev = netdev_priv(dev);
497: 	struct m_can_classdev *cdev = netdev_priv(dev);
550: 	struct m_can_classdev *cdev = netdev_priv(dev);
607: 	struct m_can_classdev *cdev = netdev_priv(dev);
617: static int m_can_clk_start(struct m_can_classdev *cdev)
633: static void m_can_clk_stop(struct m_can_classdev *cdev)
642: 	struct m_can_classdev *cdev = netdev_priv(dev);
659: 	struct m_can_classdev *cdev = netdev_priv(dev);
733: 	struct m_can_classdev *cdev = netdev_priv(dev);
783: 	struct m_can_classdev *cdev = netdev_priv(dev);
802: 	struct m_can_classdev *cdev = netdev_priv(dev);
810: 	/* Errata workaround for issue "Needless activation of MRAF irq"
847: 	struct m_can_classdev *cdev = netdev_priv(dev);
859: 	struct m_can_classdev *cdev = netdev_priv(dev);
879: 	struct m_can_classdev *cdev = netdev_priv(dev);
912: 	struct m_can_classdev *cdev = netdev_priv(dev);
1013: 	struct m_can_classdev *cdev = netdev_priv(dev);
1086: 	struct m_can_classdev *cdev = netdev_priv(dev);
1198: 	struct m_can_classdev *cdev = netdev_priv(dev);
1228: static int m_can_check_core_release(struct m_can_classdev *cdev)
1256: static bool m_can_niso_supported(struct m_can_classdev *cdev)
1287: static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
1364: 	struct m_can_classdev *cdev = netdev_priv(dev);
1375: 	struct m_can_classdev *cdev = netdev_priv(dev);
1400: 	struct m_can_classdev *cdev = netdev_priv(dev);
1412: static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
1533: 	struct m_can_classdev *cdev = container_of(ws, struct m_can_classdev,
1543: 	struct m_can_classdev *cdev = netdev_priv(dev);
1576: 	struct m_can_classdev *cdev = netdev_priv(dev);
1652: static void m_can_of_parse_mram(struct m_can_classdev *cdev,
1690: void m_can_init_ram(struct m_can_classdev *cdev)
1815: 	struct m_can_classdev *cdev = netdev_priv(ndev);
1835: 	struct m_can_classdev *cdev = netdev_priv(ndev);
github.com/apache/maven-integration-testing:core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest.java: [ master, ]
33: public class MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest
37:     public MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest()
github.com/apache/netbeans:platform/openide.windows/test/unit/src/org/openide/windows/PreventNeedlessChangesOfActionMapTest.java: [ master, ]
36: public class PreventNeedlessChangesOfActionMapTest extends NbTestCase
43:     public PreventNeedlessChangesOfActionMapTest(String s) {
49:         res = tc.getLookup().lookup(new Lookup.Template<ActionMap> (ActionMap.class));
56:         ActionMap am = (ActionMap)tc.getLookup().lookup(ActionMap.class);
73:         ActionMap am2 = (ActionMap)tc.getLookup().lookup(ActionMap.class);
42:     /** Creates a new instance of PreventNeedlessChangesOfActionMapTest */
android.googlesource.com/platform/external/swig:Doc/Manual/CPlusPlus11.html: [ master, ]
911: <H3><a name="CPlusPlus11_sizeof">7.2.26 Allow sizeof to work on members of classes without an explicit object</a></H3>
12: <div class="sectiontoc">
93: <div class="code"><pre>
94: class MyClass {
108: Generally you would just ignore them via <tt>%ignore</tt> before parsing the class.
112: <div class="code"><pre>
120: <div class="shell">
135: <div class="code"><pre>
151: <div class="code"><pre>
152: template class std::vector&lt;int&gt;;        // C++03 explicit instantiation in C++
153: extern template class std::vector&lt;int&gt;; // C++11 explicit instantiation suppression in C++
166: <div class="shell">
174: ...(1 bytes skipped)...hey often appear in constructors which are overloaded with alternative approaches to initializing a class,
179: <div class="code"><pre>
181: class Container {
190: <p>Alternatively you could modify the class and add another constructor for initialization by some other means,
193: <div class="code"><pre>
195: class Container {
207: <div class="targetlang"><pre>
212: If you are unable to modify the class being wrapped, consider ignoring the initializer-list constructor and using
216: <div class="code"><pre>
229: class Container {
239: The above makes the wrappers look is as if the class had been declared as follows:
242: <div class="code"><pre>
244: class Container {
263: <div class="code"><pre>
267: class Container {
295: <div class="code"><pre>
314: <div class="targetlang"><pre>
328: <div class="code"><pre>
334: <div class="code"><pre>
349: <div class="code"><pre>
363: <div class="code"><pre>
375: <div class="code"><pre>
383: <div class="code"><pre>
395: <div class="targetlang"><pre>
402: <div class="code"><pre>
414: <div class="code"><pre>
415: class A {
434: ...(3 bytes skipped)...s is parsed correctly, but the additional constructors are not currently added to the derived proxy class in the target language.
442: <div class="code"><pre>
443: class BaseClass {
448: class DerivedClass: public BaseClass {
459: <div class="code"><pre>
460: class SomeClass {
477: <div class="code"><pre>
501: <p>SWIG supports strongly typed enumerations and parses the new <tt>enum class</tt> syntax and forward declarator for the enums, such as:</p>
502: <div class="code"><pre>
503: enum class MyEnum : unsigned int;
510: <div class="code"><pre>
512:   enum class RainbowColors : unsigned int {
516:   enum class WarmColors {
529: However, generally, most scripting languages mangle in the strongly typed enumeration's class name,
533: <div class="targetlang"><pre>
541: <div class="shell"><pre>
546: The strongly typed languages often wrap normal enums into an enum class and so treat normal enums and strongly typed enums the same.
550: <div class="targetlang"><pre>
561: <div class="code"><pre>
571: <div class="code"><pre>
572: class U {
577: class V {
582: class TestClass {
615: <div class="code"><pre>
623: <div class="code"><pre>
630: <div class="code"><pre>
632: class SomeType {
647: <div class="code"><pre>
664: <div class="code"><pre>
687: block, variadic class inheritance and variadic constructor and
690: <div class="code"><pre>
691: template &lt;typename... BaseClasses&gt; class ClassName : public BaseClasses... {
702: <div class="code"><pre>
710: <div class="code"><pre>
726: <div class="code"><pre>
740: <div class="code"><pre>
775: <div class="code"><pre>
782: <div class="code"><pre>
790: <div class="code"><pre>
801: <div class="shell"><pre>
810: <div class="code"><pre>
818: <div class="code"><pre>
826: <div class="code"><pre>
838: <div class="code"><pre>
858: <div class="code"><pre>
878: <div class="code"><pre>
904: <div class="code"><pre>
918: <div class="code"><pre>
927: <div class="targetlang"><pre>
942: <div class="code"><pre>
955: <div class="code"><pre>
964: <div class="code"><pre>
975: <div class="code"><pre>
987: <div class="code"><pre>
1010: <div class="code"><pre>
1022: <div class="shell">
1032: <div class="code"><pre>
1042: of the <tt>RQ *</tt> class:
1045: <div class="code"><pre>
1063: <div class="code"><pre>
1078: <div class="code"><pre>
1160: <div class="code"><pre>
1177: <div class="targetlang"><pre>
1187: <div class="code"><pre>
1192:   template&lt; class T1, class T2 &gt; static int do_it(T1 &amp;, T2 &amp;)  { /*...*/ return 1; }
1197:   template&lt; class T1, class T2 &gt; static int do_it(T1, T2)  { /*...*/ return 2; }
1201: template&lt; class T1, class T2 &gt; int elaborate(T1 A, T2 B) {
1216: <div class="code"><pre>
1225: <div class="targetlang"><pre>
1236: The new <tt>std::result_of</tt> class introduced in the &lt;functional&gt; header provides a generic way to obtain the return type of a f...(47 bytes skipped)...
1239: The technique basically forward declares the <tt>std::result_of</tt> template class, then partially specializes it for the function types of interest.
1243: <div class="code"><pre>
1266: template&lt;class Fun, class Arg&gt;
1278: The empty template instantiation suffices as no proxy class is required for <tt>std::result_of&lt;Fun(Arg)&gt;::type</tt> as this type is really just a <tt>dou...(9 bytes skipped)...
1287: <div class="targetlang"><pre>
42: <li><a href="#CPlusPlus11_sizeof">Allow sizeof to work on members of classes without an explicit object</a>
162: they are intended for compile time initialization of classes using the special <tt>std::initializer_list</tt> type.
278: Needless to say, this approach is very limited, but could be improved upon, but only slightly.
437: ...(38 bytes skipped)... <tt>using</tt> syntax will add the appropriate constructors into the target language proxy derived classes.
602: The effect of explicit constructors and operators has little relevance for the proxy classes as target
1098: classes introduced (thread, mutex, locks, condition variables, task). The main reason is that
1123: While SWIG could provide wrappers for the new C++11 regular expressions classes, there is little need as the target languages have their own regular expression facilities.
1155: SWIG supports functor classes in a few languages in a very natural way.
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis5/Visualization5RS.java: [ master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
35: class Visualization5RS extends RenderScriptScene {
51:     static class WorldState {
358:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
360:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
361:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
362:         int acceleration = netforce / mNeedleMass;
363:         mNeedleSpeed += acceleration;
364:         mNeedlePos += mNeedleSpeed;
365:         if (mNeedlePos < 0) {
366:             mNeedlePos = 0;
367:             mNeedleSpeed = 0;
368:         } else if (mNeedlePos > 32767) {
369:             if (mNeedlePos > 33333) {
372:             mNeedlePos = 32767;
373:             mNeedleSpeed = 0;
379:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis4/Visualization4RS.java: [ master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
35: class Visualization4RS extends RenderScriptScene {
51:     static class WorldState {
235:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
237:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
238:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
239:         int acceleration = netforce / mNeedleMass;
240:         mNeedleSpeed += acceleration;
241:         mNeedlePos += mNeedleSpeed;
242:         if (mNeedlePos < 0) {
243:             mNeedlePos = 0;
244:             mNeedleSpeed = 0;
245:         } else if (mNeedlePos > 32767) {
246:             if (mNeedlePos > 33333) {
249:             mNeedlePos = 32767;
250:             mNeedleSpeed = 0;
256:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range
github.com/google/coding-with-chrome:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/coding-with-chrome:third_party/coding-with-chrome-libraries/third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/grpc/grpc-web:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/apache/incubator-pagespeed-mod:third_party/closure_library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/GoogleChrome/accessibility-developer-tools:lib/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/googlearchive/js-v2-samples:fusiontables/script/closure/closure/goog/ui/gaugetheme.js: [ gh-pages, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/apache/incubator-pagespeed-ngx:testing-dependencies/mod_pagespeed/third_party/closure_library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/PerfKitExplorer:lib/closure-library/closure/goog/ui/gaugetheme.js: [ master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/beautiful-audio-editor:third_party/closure_library/closure/goog/ui/gaugetheme.js: [ master, ]
128: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
140: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/blockly-devtools:closure-library/closure/goog/ui/gaugetheme.js: [ develop, ] Duplicate result
github.com/google/closure-library:closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/tracing-framework:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/crisis-info-hub:closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/googlefonts/TachyFont:run_time/src/gae_server/third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/closure-builder:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/end-to-end:lib/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/coding-with-chrome-libraries:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/vsaq:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/csp-evaluator:closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/csp-evaluator:third_party/closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/karma-runner/karma-closure:test-app/lib/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/google/gae-secure-scaffold-python:closure-library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/apache/incubator-pagespeed-debian:src/third_party/closure_library/closure/goog/ui/gaugetheme.js: [ master, ] Duplicate result
github.com/apache/freemarker:src/test/java/freemarker/core/ParsingErrorMessagesTest.java: [ 2.3-gae, ]
40:     public void testNeedlessInterpolation() {
29: public class ParsingErrorMessagesTest extends TemplateTest {
github.com/apache/hadoop:hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/testing.md: [ trunk, ]
653: ### Subclasses Existing Shared Base Classes
506: (yes, the space is necessary. The Hadoop `Configuration` class treats an empty
608: class `S3AScaleTestBase`, so only running if `scale` is defined on a build,
735: The `ContractTestUtils` class contains a whole set of assertions for making
892: class which artificially delays certain paths from appearing in listings.
893: This is implemented in the class `InconsistentAmazonS3Client`.
1024:     subclasses the `MetadataStoreTestBase` class and customizes it to initialize
95: The presence of this file triggers the testing of the S3 classes.
490: their classname.
667: Having shared base classes may help reduce future maintenance too. Please
1180: Needless to say: *it is not safe to use this against a table in active use.*
614: on isolated parts of the filesystem. Subclasses of `AbstractS3ATestBase`
657: help generate isolated paths, and for `AbstractSTestS3AHugeFiles` subclasses,
716: hard coded to ten minutes in `AbstractS3ATestBase()`; subclasses can
807: sequential one afterwards. The IO heavy ones must also be subclasses of
github.com/google/zoekt:web/e2e_test.go: [ master, ]
216: func checkNeedles(t *testing.T, ts *httptest.Server, req string, needles []string) {
169: 			`pre id="l1" class="inline-pre"><span class="noselect"><a href="#l1">`,
119: 		checkNeedles(t, ts, req, needles)
172: 		checkNeedles(t, ts, req, needles)
212: 		checkNeedles(t, ts, req, needles)
gerrit.googlesource.com/zoekt:web/e2e_test.go: [ master, ] Duplicate result
github.com/google/mysql-protobuf:unittest/gunit/item_like-t.cc: [ mysql-5.7.9, ]
218: static const char* falseNeedles[] = {
25: #include "sql_class.h"
39: class ItemLikeTest : public ::testing::Test
91: class ItemLikeTestP : public ::testing::TestWithParam<const char*>
108: class ItemFalseLikeTestP : public ::testing::TestWithParam<const char*>
199: INSTANTIATE_TEST_CASE_P(MoreNeedles, ItemLikeTestP,
203: TEST_P(ItemLikeTestP, MoreNeedlesTest)
289: INSTANTIATE_TEST_CASE_P(FalseNeedlesTest, ItemFalseLikeTestP,
290:                         ::testing::ValuesIn(falseNeedles));
292: TEST_P(ItemFalseLikeTestP,FalseNeedlesTest)
github.com/google/ion:third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java: [ master, ]
32:  * This class performs two functions.
38:  * Needless to say, this class is tightly coupled to the binary format
48: public final class UPropertyAliases {
70:     private static final class IsAcceptable implements ICUBinary.Authenticate {
skia.googlesource.com/external/github.com/unicode-org/icu:icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java: [ master, ]
32:  * This class performs two functions.
38:  * Needless to say, this class is tightly coupled to the binary format
48: public final class UPropertyAliases {
70:     private static final class IsAcceptable implements ICUBinary.Authenticate {
android.googlesource.com/platform/external/icu:icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java: [ master, ] Duplicate result
android.googlesource.com/platform/external/jetbrains/JetBrainsRuntime:src/java.base/share/classes/sun/security/provider/CtrDrbg.java: [ master, ]
35: public class CtrDrbg extends AbstractDrbg {
412:             // Step 1-2. Needless
github.com/google/mysql-protobuf:storage/ndb/mcc/frontend/dojo/dojox/gauges/GlossyCircularGaugeNeedle.js.uncompressed.js: [ mysql-5.7.9, ]
17: 	//		Since the needle is created by the gauges class, you do not have to use this class directly.
2: define("dojox/gauges/GlossyCircularGaugeNeedle", ["dojo/_base/declare","dojo/_base/Color" ,"./AnalogIndicatorBase"],
9: return declare("dojox.gauges.GlossyCircularGaugeNeedle", [AnalogIndicatorBase], {
github.com/angular/builtwith.angularjs.org:projects/projects.json: [ master, ]
561:       "desc": "STOIC turns your Google Spreadsheets into complete applications, with a cloud-class database in the back-end, and a user interface for mobile devices.",
1047:       "name": "Tuft & Needle",
2019:       "desc": "Neobazaar free classifieds",
2029:         "Free classifieds",
chromium.googlesource.com/arc/arc:third_party/android/external/chromium/chrome/browser/sync/syncable/syncable.h: [ master, ]
33: class DictionaryValue;
37: class ReadTransaction;
38: class WriteNode;
39: class ReadNode;
43: class DirectoryChangeListener;
44: class Entry;
48: class DirectoryBackingStore;
179: class BaseTransaction;
180: class WriteTransaction;
181: class ReadTransaction;
182: class Directory;
183: class ScopedDirLookup;
222: // The EntryKernel class contains the actual data for an entry.
347: class Entry {
348:   friend class Directory;
438:   friend class sync_api::ReadNode;
460: class MutableEntry : public Entry {
461:   friend class WriteTransaction;
462:   friend class Directory;
520:   friend class sync_api::WriteNode;
541: class LessParentIdAndHandle;
543: class LessField;
544: class LessEntryMetaHandles {
567: // index, the traits are grouped into a class called an Indexer which
606:   class Comparator {
659: class ScopedKernelLock;
660: class IdFilter;
661: class DirectoryManager;
663: class Directory {
664:   friend class BaseTransaction;
665:   friend class Entry;
666:   friend class MutableEntry;
667:   friend class ReadTransaction;
668:   friend class ReadTransactionWithoutDB;
669:   friend class ScopedKernelLock;
670:   friend class ScopedKernelUnlock;
671:   friend class WriteTransaction;
672:   friend class SyncableDirectoryTest;
682:   class EventListenerHookup;
828:   template <class T> void TestAndSet(T* kernel_data, const T* data_to_set);
1001:     // look something up in an index.  Needle in haystack metaphor.
1071: class ScopedKernelLock {
1082: class BaseTransaction {
1083:   friend class Entry;
1118: class ReadTransaction : public BaseTransaction {
1128:   friend class sync_api::ReadTransaction;
1135: class WriteTransaction : public BaseTransaction {
1136:   friend class MutableEntry;
647: // friend classes.  The in-memory indices are protected against
github.com/google/coding-with-chrome:third_party/closure-library/closure/goog/ui/gauge.js: [ master, ]
45:  * This is an internal-only class.
960:   var stroke = theme.getNeedleStroke();
961:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/coding-with-chrome:third_party/coding-with-chrome-libraries/third_party/closure-library/closure/goog/ui/gauge.js: [ master, ] Duplicate result
android.googlesource.com/platform/external/python/cpython3:Lib/tarfile.py: [ master, ]
266: class TarError(Exception):
269: class ExtractError(TarError):
272: class ReadError(TarError):
275: class CompressionError(TarError):
278: class StreamError(TarError):
281: class HeaderError(TarError):
284: class EmptyHeaderError(HeaderError):
287: class TruncatedHeaderError(HeaderError):
290: class EOFHeaderError(HeaderError):
293: class InvalidHeaderError(HeaderError):
296: class SubsequentHeaderError(HeaderError):
303: class _LowLevelFile:
327: class _Stream:
565: # class _Stream
567: class _StreamProxy(object):
568:     """Small proxy class that enables transparent compression
592: # class StreamProxy
597: class _FileInFile(object):
699: #class _FileInFile
701: class ExFileObject(io.BufferedReader):
707: #class ExFileObject
712: class TarInfo(object):
713:     """Informational class which holds the details about an
790:         return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))
1411: # class TarInfo
1413: class TarFile(object):
1435:     tarinfo = TarInfo           # The default TarInfo class to use.
1541:     # TarFile class. The open() method is the only one that is needed for
1553:            an appropriate TarFile class.
2384:             raise OSError("%s is closed" % self.__class__.__name__)
906:     @classmethod
966:     @classmethod
983:     @classmethod
1008:                 # Needless to say, that the encoding must match the string.
1034:     @classmethod
1097:     @classmethod
1110:     # subclass to add custom _proc_*() methods. A _proc_*() method MUST
1540:     # Below are the classmethods which act as alternate constructors to the
1546:     # This concept allows one to subclass TarFile without losing the comfort of
1550:     @classmethod
1641:     @classmethod
1649:     @classmethod
1683:     @classmethod
1712:     @classmethod
2162:     # subclass to implement other functionality.
android.googlesource.com/platform/external/markdown:MarkdownTest/Tests_2004/Markdown Documentation - Syntax.html: [ master, ]
6:     <li><a class="selected" title="Markdown Syntax Documentation">Syntax</a></li>
525: <pre><code>    &lt;div class="footer"&gt;
532: <pre><code>&lt;pre&gt;&lt;code&gt;&amp;lt;div class="footer"&amp;gt;
138: <p>in your anchor tag <code>href</code> attribute. Needless to say, this is easy to
android.googlesource.com/platform/external/markdown:MarkdownTest/Tests_2007/Markdown Documentation - Syntax.html: [ master, ] Duplicate result
github.com/google/fhir:spec/hl7.fhir.core/4.0.0/package/CodeSystem-v2-0496.json: [ master, ]
1: ...(180 bytes skipped)...<div xmlns=\"http://www.w3.org/1999/xhtml\">\n            <p>Consent Type</p>\n\n            <table class...(23170 bytes skipped)...       <td>085\n                  <a name=\"085\"> </a>\n                </td>\n                <td>Needle...(156 bytes skipped)...       <td>086\n                  <a name=\"086\"> </a>\n                </td>\n                <td>Needle...(30538 bytes skipped)...codesystem-concept-comments","valueString":"Medical Treatment/ Procedure"}],"code":"085","display":"Needle...(72 bytes skipped)...codesystem-concept-comments","valueString":"Medical Treatment/ Procedure"}],"code":"086","display":"Needle Biopsy of Lung"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/codesystem-concept-c...(9546 bytes skipped)...
github.com/google/fhir:spec/hl7.fhir.core/1.0.2/package/ValueSet-v2-0496.json: [ master, ]
1: ...(172 bytes skipped)...<div xmlns=\"http://www.w3.org/1999/xhtml\">\n            <p>Consent Type</p>\n\n            <table class...(23180 bytes skipped)...       <td>085\n                  <a name=\"085\"> </a>\n                </td>\n                <td>Needle...(156 bytes skipped)...       <td>086\n                  <a name=\"086\"> </a>\n                </td>\n                <td>Needle...(29531 bytes skipped)...efinition/valueset-comments","valueString":"Medical Treatment/ Procedure"}],"code":"085","display":"Needle...(62 bytes skipped)...efinition/valueset-comments","valueString":"Medical Treatment/ Procedure"}],"code":"086","display":"Needle Biopsy of Lung"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/valueset-comments","...(9037 bytes skipped)...
github.com/google/fhir:spec/hl7.fhir.core/3.0.1/package/CodeSystem-v2-0496.json: [ master, ]
1: ...(164 bytes skipped)...<div xmlns=\"http://www.w3.org/1999/xhtml\">\n            <p>Consent Type</p>\n\n            <table class...(23180 bytes skipped)...       <td>085\n                  <a name=\"085\"> </a>\n                </td>\n                <td>Needle...(156 bytes skipped)...       <td>086\n                  <a name=\"086\"> </a>\n                </td>\n                <td>Needle...(29887 bytes skipped)...inition/codesystem-comments","valueString":"Medical Treatment/ Procedure"}],"code":"085","display":"Needle...(64 bytes skipped)...inition/codesystem-comments","valueString":"Medical Treatment/ Procedure"}],"code":"086","display":"Needle Biopsy of Lung"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/codesystem-comments"...(9138 bytes skipped)...
android.googlesource.com/platform/superproject:external/python/cpython3/Lib/tarfile.py: [ master, ] Duplicate result
github.com/grpc/grpc-web:third_party/closure-library/closure/goog/ui/gauge.js: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/markdown/MarkdownTest/Tests_2004/Markdown Documentation - Syntax.html: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/markdown/MarkdownTest/Tests_2007/Markdown Documentation - Syntax.html: [ master, ] Duplicate result
github.com/asciidoctor/jekyll-asciidoc:spec/jekyll-asciidoc_spec.rb: [ master, ]
345:       (expect contents).to include '<div class="page-content">'
369:       (expect contents).to include '<div class="page-content">'
441:       (expect contents).to include %(<div class="page-content">\n\n</div>)
449:       (expect contents).to include %(<div class="page-content">\n\n</div>)
456:       (expect contents).to include %(<div class="sect1 section-role">\n<h2 id="section-id">Section Title</h2>)
542:       (expect contents).to include(%(div class="paragraph">\n<p>Lorem ipsum.</p>\n</div>))
813:       (expect contents).to include %(div class="paragraph">\n<p>Lorem ipsum.</p>\n</div>)
821:       (expect contents).to include '<h1 class="post-title">Show Me the Title</h1>'
857:         %(<time class="date-published" datetime="#{date.xmlschema}">),
875:         %(<time class="date-published" datetime="#{date.xmlschema}">),
893:         %(<time class="date-published" datetime="#{date.xmlschema}">),
912:       (expect contents).to include '<div class="excerpt">This is the <em>excerpt</em> of this post.</div>'
919:       (expect contents).to include %(<div class="paragraph">\n<p>Lorem ipsum.</p>\n</div>)
987:       (expect $1).to include '<p class="excerpt"></p>'
995:       (expect $1).to include '<p class="excerpt"></p>'
1225:       (expect index_contents).to include '<h1>Needle In Haystack</h1>'
1306:       (expect contents).to include '<p class="summary">A <strong>very</strong> welcoming <em>welcome</em> page.</p>'
1321:       aside = (contents.match %r/<aside class="page-toc">.*<\/aside>/m)[0]
1322:       (expect aside).to include '<ul class="sectlevel1">'
android.googlesource.com/platform/external/swig:Doc/Manual/Preface.html: [ master, ]
12: <div class="sectiontoc">
100: <div class="shell"><pre>
113: <div class="shell"><pre>
127: <div class="shell"><pre>
207: <div class="code"><pre>
297: <div class="shell"><pre>
309: <div class="shell"><pre>
325: <div class="shell"><pre>
400: <div class="shell"><pre>
429: <div class="shell"><pre>
72: Version 3.0.0 was released in 2014 focusing on adding C++11 support and C++ nested classes.
389: Needless to say, you might have to experiment a bit to get things working at first.
github.com/apache/openwhisk-client-js:README.md: [ master, ]
120: - **proxy.** HTTP(s) URI for proxy service to forwards requests through. Uses Needle's [built-in proxy support](https://github.com/tomas/needle#request-options).
121: - **agent.** Provide custom [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) implementation.
167: If you need more advanced proxy behaviour, rather than using Needle's default [built-in HTTP agent](https://github.com/tomas/needle), the `agent` constructor parameter...(150 bytes skipped)...
chromium.googlesource.com/chromium:sync/syncable/directory.h: [ trunk, ]
23: class Cryptographer;
24: class UnrecoverableErrorHandler;
28: class BaseTransaction;
29: class DirectoryChangeDelegate;
30: class DirectoryBackingStore;
31: class NigoriHandler;
32: class ScopedKernelLock;
33: class TransactionObserver;
34: class WriteTransaction;
50: // index, the traits are grouped into a class called an Indexer which
53: template <typename FieldType, FieldType field_index> class LessField;
91:   class Comparator {
115: class EntryKernelLessByMetaHandle {
131: class Directory {
132:   friend class BaseTransaction;
133:   friend class Entry;
134:   friend class MutableEntry;
135:   friend class ReadTransaction;
136:   friend class ReadTransactionWithoutDB;
137:   friend class ScopedKernelLock;
138:   friend class ScopedKernelUnlock;
139:   friend class WriteTransaction;
140:   friend class SyncableDirectoryTest;
336:   template <class T> void TestAndSet(T* kernel_data, const T* data_to_set);
535:     // look something up in an index.  Needle in haystack metaphor.
chromium.googlesource.com/git/chromium:sync/syncable/directory.h: [ trunk, ] Duplicate result
android.googlesource.com/platform/external/qt:Mac-4.7.4/src/corelib/tools/qbytearray.cpp: [ master, ]
606:     \class QByteArray
607:     \brief The QByteArray class provides an array of bytes.
622:     In addition to QByteArray, Qt also provides the QString class to
623:     store string data. For most purposes, QString is the class you
1093:     The return value is of type QByteRef, a helper class for
1188:     Note: QByteArray is an \l{implicitly shared} class. Consequently,
1482:     Note: QByteArray is an \l{implicitly shared} class. Consequently,
1562:     Note: QByteArray is an \l{implicitly shared} class. Consequently,
3812:     because QByteArray is an \l{implicitly shared} class and the
2304:     uint hashNeedle = 0, hashHaystack = 0;
2307:         hashNeedle = ((hashNeedle<<1) + *(n-idx));
2313:         if (hashHaystack == hashNeedle && memcmp(needle, haystack, ol) == 0)
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/abseil-cpp/absl/container/internal/layout.h: [ master, ]
105: //   class CompactString {
148: // - class `Layout<>` and its public members.
149: // - The public members of class `internal_layout::LayoutImpl<>`. That class
151: //   list are internal implementation details, but the class itself provides
200: template <class T, size_t N>
205: template <class T>
208: template <class T, size_t N>
216: template <class>
219: template <class T>
224: template <class T, size_t N>
229: template <class T>
232: template <class T, size_t N>
236: template <class T>
241: template <class T, size_t N>
249: template <class T, class... Ts>
252: template <class From, class To>
258: template <class T>
265: template <class Needle, class... Ts>
266: constexpr size_t Find(Needle, Needle, Ts...) {
267:   static_assert(!Contains<Needle, Ts...>(), "Duplicate element type");
271: template <class Needle, class T, class... Ts>
272: constexpr size_t Find(Needle, T, Ts...) {
273:   return adl_barrier::Find(Needle(), Ts()...) + 1;
286: template <class... Ts>
291: template <class T>
316: template <class T>
323: template <class Elements, class SizeSeq, class OffsetSeq>
324: class LayoutImpl;
326: // Public base class of `Layout` and the result type of `Layout::Partial()`.
337: template <class... Elements, size_t... SizeSeq, size_t... OffsetSeq>
338: class LayoutImpl<std::tuple<Elements...>, absl::index_sequence<SizeSeq...>,
358:   template <class T>
416:   template <class T>
449:   template <class T>
471:   template <size_t N, class Char>
497:   template <class T, class Char>
518:   template <class Char>
538:   template <size_t N, class Char>
555:   template <class T, class Char>
576:   template <class Char>
607:   template <class Char, size_t N = NumOffsets - 1, EnableIf<N == 0> = 0>
612:   template <class Char, size_t N = NumOffsets - 1, EnableIf<N != 0> = 0>
666: template <size_t NumSizes, class... Ts>
679: template <class... Ts>
680: class Layout : public internal_layout::LayoutType<sizeof...(Ts), Ts...> {
717:   template <class... Sizes>
android.googlesource.com/platform/superproject:external/bzip2/manual.html: [ master, ]
82: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="bzip2 and libbzip2, version 1.0.6">
83: <div class="titlepage">
85: <div><h1 class="title">
87: <div><h2 class="subtitle">A program and library for data compression</h2></div>
88: <div><div class="authorgroup"><div class="author">
89: <h3 class="author">
90: <span class="firstname">Julian</span> <span class="surname">Seward</span>
92: <div class="affiliation"><span class="orgname">http://www.bzip.org<br></span></div>
94: <div><p class="releaseinfo">Version 1.0.6 of 6 September 2010</p></div>
95: <div><p class="copyright">Copyright © 1996-2010 Julian Seward</p></div>
96: <div><div class="legalnotice" title="Legal Notice">
97: <a name="id537185"></a><p>This program, <code class="computeroutput">bzip2</code>, the
98:   associated library <code class="computeroutput">libbzip2</code>, and
104: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
105: <li class="listitem" style="list-style-type: disc"><p>Redistributions of source code must retain the
108: <li class="listitem" style="list-style-type: disc"><p>The origin of this software must not be
113: <li class="listitem" style="list-style-type: disc"><p>Altered source versions must be plainly marked
116: <li class="listitem" style="list-style-type: disc"><p>The name of the author may not be used to
133:  <code class="computeroutput">bzip2</code> and
134:  <code class="computeroutput">libbzip2</code> do not use any patented
143: <div class="toc">
146: <dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt>
147: <dt><span class="chapter"><a href="#using">2. How to use bzip2</a></span></dt>
149: <dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
150: <dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
151: <dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
152: <dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
153: <dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
154: <dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
155: <dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
156: <dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
157: <dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
159: <dt><span class="chapter"><a href="#libprog">3. 
160: Programming with <code class="computeroutput">libbzip2</code>
163: <dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
165: <dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
166: <dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
167: <dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
169: <dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
170: <dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
172: <dt><span class="sect2"><a href="#bzcompress-init">3.3.1. BZ2_bzCompressInit</a></span></dt>
173: <dt><span class="sect2"><a href="#bzCompress">3.3.2. BZ2_bzCompress</a></span></dt>
174: <dt><span class="sect2"><a href="#bzCompress-end">3.3.3. BZ2_bzCompressEnd</a></span></dt>
175: <dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. BZ2_bzDecompressInit</a></span></dt>
176: <dt><span class="sect2"><a href="#bzDecompress">3.3.5. BZ2_bzDecompress</a></span></dt>
177: <dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. BZ2_bzDecompressEnd</a></span></dt>
179: <dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
181: <dt><span class="sect2"><a href="#bzreadopen">3.4.1. BZ2_bzReadOpen</a></span></dt>
182: <dt><span class="sect2"><a href="#bzread">3.4.2. BZ2_bzRead</a></span></dt>
183: <dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. BZ2_bzReadGetUnused</a></span></dt>
184: <dt><span class="sect2"><a href="#bzreadclose">3.4.4. BZ2_bzReadClose</a></span></dt>
185: <dt><span class="sect2"><a href="#bzwriteopen">3.4.5. BZ2_bzWriteOpen</a></span></dt>
186: <dt><span class="sect2"><a href="#bzwrite">3.4.6. BZ2_bzWrite</a></span></dt>
187: <dt><span class="sect2"><a href="#bzwriteclose">3.4.7. BZ2_bzWriteClose</a></span></dt>
188: <dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
189: <dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
191: <dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
193: <dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. BZ2_bzBuffToBuffCompress</a></span></dt>
194: <dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. BZ2_bzBuffToBuffDecompress</a></span></dt>
196: <dt><span class="sect1"><a href="#zlib-compat">3.6. zlib compatibility functions</a></span></dt>
197: <dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a stdio-free environment</a></span></dt>
199: <dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of stdio</a></span></dt>
200: <dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
202: <dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
204: <dt><span class="chapter"><a href="#misc">4. Miscellanea</a></span></dt>
206: <dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
207: <dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
208: <dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
209: <dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
210: <dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
214: <div class="chapter" title="1. Introduction">
215: <div class="titlepage"><div><div><h2 class="title">
217: <p><code class="computeroutput">bzip2</code> compresses files
223: <p><code class="computeroutput">bzip2</code> is built on top of
224: <code class="computeroutput">libbzip2</code>, a flexible library for
226: <code class="computeroutput">bzip2</code> format.  This manual
231: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
232: <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> describes how to use
233:  <code class="computeroutput">bzip2</code>; this is the only part
236: <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#libprog" title="3.  Programming with libbzip2">Programming with libbzip2</a> describe...(5 bytes skipped)...
238: <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#misc" title="4. Miscellanea">Miscellanea</a> records some
243: <div class="chapter" title="2. How to use bzip2">
244: <div class="titlepage"><div><div><h2 class="title">
246: <div class="toc">
249: <dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
250: <dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
251: <dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
252: <dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
253: <dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
254: <dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
255: <dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
256: <dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
257: <dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
261: <code class="computeroutput">bzip2</code> man page, and nothing
263: <div class="sect1" title="2.1. NAME">
264: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
266: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
267: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code>,
268:   <code class="computeroutput">bunzip2</code> - a block-sorting file
270: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> -
272: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code> -
276: <div class="sect1" title="2.2. SYNOPSIS">
277: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
279: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
280: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code> [
282: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bunzip2</code> [
284: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> [ -s ] [
286: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code>
290: <div class="sect1" title="2.3. DESCRIPTION">
291: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
293: <p><code class="computeroutput">bzip2</code> compresses files
300: those of GNU <code class="computeroutput">gzip</code>, but they are
302: <p><code class="computeroutput">bzip2</code> expects a list of
305: <code class="computeroutput">original_name.bz2</code>.  Each
314: <p><code class="computeroutput">bzip2</code> and
315: <code class="computeroutput">bunzip2</code> will by default not
317: the <code class="computeroutput">-f</code> flag.</p>
319: <code class="computeroutput">bzip2</code> compresses from standard
321: <code class="computeroutput">bzip2</code> will decline to write
324: <p><code class="computeroutput">bunzip2</code> (or
325: <code class="computeroutput">bzip2 -d</code>) decompresses all
327: <code class="computeroutput">bzip2</code> will be detected and
329: <code class="computeroutput">bzip2</code> attempts to guess the
332: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
333: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz2 </code>
335:   <code class="computeroutput">filename</code></p></li>
336: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz </code>
338:   <code class="computeroutput">filename</code></p></li>
339: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.tbz2</code>
341:   <code class="computeroutput">filename.tar</code></p></li>
342: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.tbz </code>
344:   <code class="computeroutput">filename.tar</code></p></li>
345: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">anyothername </code>
347:   <code class="computeroutput">anyothername.out</code></p></li>
350: <code class="computeroutput">.bz2</code>,
351: <code class="computeroutput">.bz</code>,
352: <code class="computeroutput">.tbz2</code> or
353: <code class="computeroutput">.tbz</code>,
354: <code class="computeroutput">bzip2</code> complains that it cannot
356: with <code class="computeroutput">.out</code> appended.</p>
359: <p><code class="computeroutput">bunzip2</code> will correctly
363: (<code class="computeroutput">-t</code>) of concatenated compressed
366: output by giving the <code class="computeroutput">-c</code> flag.
372: <code class="computeroutput">bzip2</code> version 0.9.0 or later.
373: Earlier versions of <code class="computeroutput">bzip2</code> will
375: <p><code class="computeroutput">bzcat</code> (or
376: <code class="computeroutput">bzip2 -dc</code>) decompresses all
378: <p><code class="computeroutput">bzip2</code> will read arguments
380: <code class="computeroutput">BZIP2</code> and
381: <code class="computeroutput">BZIP</code>, in that order, and will
392: <code class="computeroutput">bzip2</code> uses 32-bit CRCs to make
396: <code class="computeroutput">bzip2</code> (hopefully very unlikely).
402: <code class="computeroutput">bzip2recover</code> to try to recover
408: <code class="computeroutput">bzip2</code> to panic.</p>
410: <div class="sect1" title="2.4. OPTIONS">
411: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
413: <div class="variablelist"><dl>
414: <dt><span class="term"><code class="computeroutput">-c --stdout</code></span></dt>
417: <dt><span class="term"><code class="computeroutput">-d --decompress</code></span></dt>
419:   <code class="computeroutput">bzip2</code>,
420:   <code class="computeroutput">bunzip2</code> and
421:   <code class="computeroutput">bzcat</code> are really the same
425: <dt><span class="term"><code class="computeroutput">-z --compress</code></span></dt>
427:   <code class="computeroutput">-d</code>: forces compression,
429: <dt><span class="term"><code class="computeroutput">-t --test</code></span></dt>
433: <dt><span class="term"><code class="computeroutput">-f --force</code></span></dt>
436:   <code class="computeroutput">bzip2</code> will not overwrite
438:   <code class="computeroutput">bzip2</code> to break hard links to
440: <p><code class="computeroutput">bzip2</code> normally declines
442:   bytes. If forced (<code class="computeroutput">-f</code>),
444:   how GNU <code class="computeroutput">gzip</code> behaves.</p>
446: <dt><span class="term"><code class="computeroutput">-k --keep</code></span></dt>
449: <dt><span class="term"><code class="computeroutput">-s --small</code></span></dt>
456: <p>During compression, <code class="computeroutput">-s</code>
460:   use <code class="computeroutput">-s</code> for everything.  See
461:   <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below.</p>
463: <dt><span class="term"><code class="computeroutput">-q --quiet</code></span></dt>
467: <dt><span class="term"><code class="computeroutput">-v --verbose</code></span></dt>
470:   <code class="computeroutput">-v</code>'s increase the verbosity
473: <dt><span class="term"><code class="computeroutput">-L --license -V --version</code></span></dt>
476: <dt><span class="term"><code class="computeroutput">-1</code> (or
477:  <code class="computeroutput">--fast</code>) to
478:  <code class="computeroutput">-9</code> (or
479:  <code class="computeroutput">-best</code>)</span></dt>
481:   when compressing.  Has no effect when decompressing.  See <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below.  The
482:   <code class="computeroutput">--fast</code> and
483:   <code class="computeroutput">--best</code> aliases are primarily
484:   for GNU <code class="computeroutput">gzip</code> compatibility.
485:   In particular, <code class="computeroutput">--fast</code> doesn't
487:   <code class="computeroutput">--best</code> merely selects the
489: <dt><span class="term"><code class="computeroutput">--</code></span></dt>
493:   <code class="computeroutput">bzip2 --
496: <span class="term"><code class="computeroutput">--repetitive-fast</code>, </span><span class="term"><code class="computeroutput">--repetitive-best</code></span>
505: <div class="sect1" title="2.5. MEMORY MANAGEMENT">
506: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
508: <p><code class="computeroutput">bzip2</code> compresses large
511: and decompression.  The flags <code class="computeroutput">-1</code>
512: through <code class="computeroutput">-9</code> specify the block
516: <code class="computeroutput">bunzip2</code> then allocates itself
519: <code class="computeroutput">-1</code> to
520: <code class="computeroutput">-9</code> are irrelevant to and so
524: <pre class="programlisting">Compression:   400k + ( 8 x block size )
531: using <code class="computeroutput">bzip2</code> on small machines.
536: <code class="computeroutput">bunzip2</code> will require about 3700
538: 4 megabyte machine, <code class="computeroutput">bunzip2</code> has
542: flag is <code class="computeroutput">-s</code>.</p>
552: with the flag <code class="computeroutput">-9</code> will cause the
564: <pre class="programlisting">        Compress   Decompress   Decompress   Corpus
577: <div class="sect1" title="2.6. RECOVERING DATA FROM DAMAGED FILES">
578: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
580: <p><code class="computeroutput">bzip2</code> compresses files in
583: multi-block <code class="computeroutput">.bz2</code> file to become
591: <p><code class="computeroutput">bzip2recover</code> is a simple
593: <code class="computeroutput">.bz2</code> files, and write each block
594: out into its own <code class="computeroutput">.bz2</code> file.  You
595: can then use <code class="computeroutput">bzip2 -t</code> to test
598: <p><code class="computeroutput">bzip2recover</code> takes a
600: number of files <code class="computeroutput">rec0001file.bz2</code>,
601: <code class="computeroutput">rec0002file.bz2</code>, etc, containing
604: <code class="computeroutput">bzip2 -dc rec*file.bz2 &gt;
607: <p><code class="computeroutput">bzip2recover</code> should be of
608: most use dealing with large <code class="computeroutput">.bz2</code>
615: <div class="sect1" title="2.7. PERFORMANCE NOTES">
616: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
626: <code class="computeroutput">-vvvv</code> option to monitor progress
630: <p><code class="computeroutput">bzip2</code> usually allocates
638: <code class="computeroutput">bzip2</code> will perform best on
641: <div class="sect1" title="2.8. CAVEATS">
642: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
645: <code class="computeroutput">bzip2</code> tries hard to detect I/O
649: <code class="computeroutput">bzip2</code>.  Compressed data created by
656: <p><code class="computeroutput">bzip2recover</code> versions
662: <code class="computeroutput">bzip2recover</code> was built with such
665: <code class="computeroutput">MaybeUInt64</code> set to be an
668: <div class="sect1" title="2.9. AUTHOR">
669: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
672: <code class="computeroutput">jseward@bzip.org</code></p>
674: <code class="computeroutput">bzip2</code> are due to (at least) the
678: the original <code class="computeroutput">bzip</code>, and many
681: <code class="computeroutput">bzip</code>).  I am much indebted for
693: <div class="chapter" title="3.  Programming with libbzip2">
694: <div class="titlepage"><div><div><h2 class="title">
696: Programming with <code class="computeroutput">libbzip2</code>
698: <div class="toc">
701: <dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
703: <dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
704: <dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
705: <dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
707: <dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
708: <dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
710: <dt><span class="sect2"><a href="#bzcompress-init">3.3.1. BZ2_bzCompressInit</a></span></dt>
711: <dt><span class="sect2"><a href="#bzCompress">3.3.2. BZ2_bzCompress</a></span></dt>
712: <dt><span class="sect2"><a href="#bzCompress-end">3.3.3. BZ2_bzCompressEnd</a></span></dt>
713: <dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. BZ2_bzDecompressInit</a></span></dt>
714: <dt><span class="sect2"><a href="#bzDecompress">3.3.5. BZ2_bzDecompress</a></span></dt>
715: <dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. BZ2_bzDecompressEnd</a></span></dt>
717: <dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
719: <dt><span class="sect2"><a href="#bzreadopen">3.4.1. BZ2_bzReadOpen</a></span></dt>
720: <dt><span class="sect2"><a href="#bzread">3.4.2. BZ2_bzRead</a></span></dt>
721: <dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. BZ2_bzReadGetUnused</a></span></dt>
722: <dt><span class="sect2"><a href="#bzreadclose">3.4.4. BZ2_bzReadClose</a></span></dt>
723: <dt><span class="sect2"><a href="#bzwriteopen">3.4.5. BZ2_bzWriteOpen</a></span></dt>
724: <dt><span class="sect2"><a href="#bzwrite">3.4.6. BZ2_bzWrite</a></span></dt>
725: <dt><span class="sect2"><a href="#bzwriteclose">3.4.7. BZ2_bzWriteClose</a></span></dt>
726: <dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
727: <dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
729: <dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
731: <dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. BZ2_bzBuffToBuffCompress</a></span></dt>
732: <dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. BZ2_bzBuffToBuffDecompress</a></span></dt>
734: <dt><span class="sect1"><a href="#zlib-compat">3.6. zlib compatibility functions</a></span></dt>
735: <dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a stdio-free environment</a></span></dt>
737: <dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of stdio</a></span></dt>
738: <dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
740: <dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
744: <code class="computeroutput">libbzip2</code>.</p>
747: <a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> as well.</p>
748: <div class="sect1" title="3.1. Top-level structure">
749: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
751: <p><code class="computeroutput">libbzip2</code> is a flexible
753: <code class="computeroutput">bzip2</code> data format.  Although
758: <code class="computeroutput">libbzip2</code>'s interfaces is similar
760: <code class="computeroutput">zlib</code> library.</p>
762: <code class="computeroutput">BZ2_</code>.  This is new in version
766: <code class="computeroutput">#include &lt;bzlib.h&gt;</code>
768: <div class="sect2" title="3.1.1. Low-level summary">
769: <div class="titlepage"><div><div><h3 class="title">
776: <code class="computeroutput">stdio.h</code>, which may be helpful
781: <code class="computeroutput">BZ2_bzCompressInit</code>,
782: <code class="computeroutput">BZ2_bzCompress</code>, and
783: <code class="computeroutput">BZ2_bzCompressEnd</code> for
785: <code class="computeroutput">BZ2_bzDecompressInit</code>,
786: <code class="computeroutput">BZ2_bzDecompress</code> and
787: <code class="computeroutput">BZ2_bzDecompressEnd</code> for
788: decompression.  The <code class="computeroutput">*Init</code>
791: <code class="computeroutput">*End</code> functions close down
794: <code class="computeroutput">BZ2_bzCompress</code> and
795: <code class="computeroutput">BZ2_bzDecompress</code>.  These
803: <div class="sect2" title="3.1.2. High-level summary">
804: <div class="titlepage"><div><div><h3 class="title">
808: <code class="computeroutput">bzip2</code> format files
809: (<code class="computeroutput">.bz2</code> files).  The routines
811: <code class="computeroutput">bzip2</code> data stream is embedded
813: multiple <code class="computeroutput">bzip2</code> data streams
816: <code class="computeroutput">BZ2_bzReadOpen</code>,
817: <code class="computeroutput">BZ2_bzRead</code>,
818: <code class="computeroutput">BZ2_bzReadClose</code> and 
819: <code class="computeroutput">BZ2_bzReadGetUnused</code> are
821: <code class="computeroutput">BZ2_bzWriteOpen</code>,
822: <code class="computeroutput">BZ2_bzWrite</code> and
823: <code class="computeroutput">BZ2_bzWriteFinish</code> are
828: you may have to consult <code class="computeroutput">errno</code> to
831: <code class="computeroutput">errno</code> in a multithreaded
834: <code class="computeroutput">BZ2_bzReadOpen</code> and
835: <code class="computeroutput">BZ2_bzWriteOpen</code> require you to
836: pass them file handles (<code class="computeroutput">FILE*</code>s)
842: <div class="sect2" title="3.1.3. Utility functions summary">
843: <div class="titlepage"><div><div><h3 class="title">
846: <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
847: <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> are
855: (<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>) has
857: <code class="computeroutput">zlib</code> compatibility.  These
858: functions are <code class="computeroutput">BZ2_bzopen</code>,
859: <code class="computeroutput">BZ2_bzread</code>,
860: <code class="computeroutput">BZ2_bzwrite</code>,
861: <code class="computeroutput">BZ2_bzflush</code>,
862: <code class="computeroutput">BZ2_bzclose</code>,
863: <code class="computeroutput">BZ2_bzerror</code> and
864: <code class="computeroutput">BZ2_bzlibVersion</code>.  You may find
874: <div class="sect1" title="3.2. Error handling">
875: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
893: <p>The file <code class="computeroutput">bzlib.h</code> contains
896: <code class="computeroutput">bzlib_private.h</code>.</p>
897: <p>In <code class="computeroutput">bzlib.h</code>, the various
904: <div class="variablelist"><dl>
905: <dt><span class="term"><code class="computeroutput">BZ_OK</code></span></dt>
908: <dt><span class="term"><code class="computeroutput">BZ_RUN_OK, BZ_FLUSH_OK,
911:    <code class="computeroutput">BZ2_bzCompress</code>, the requested
914: <dt><span class="term"><code class="computeroutput">BZ_STREAM_END</code></span></dt>
921: <div class="variablelist"><dl>
922: <dt><span class="term"><code class="computeroutput">BZ_CONFIG_ERROR</code></span></dt>
926:    <code class="computeroutput">sizeof(char)</code>,
927:    <code class="computeroutput">sizeof(short)</code> and
928:    <code class="computeroutput">sizeof(int)</code> are not 1, 2 and
932:    <code class="computeroutput">sizeof(long)</code> and
933:    <code class="computeroutput">sizeof(void*)</code> are 8.  Under
934:    LP64, <code class="computeroutput">sizeof(int)</code> is still 4,
935:    so <code class="computeroutput">libbzip2</code>, which doesn't
936:    use the <code class="computeroutput">long</code> type, is
938: <dt><span class="term"><code class="computeroutput">BZ_SEQUENCE_ERROR</code></span></dt>
942:    <code class="computeroutput">libbzip2</code> checks as much as it
944:    <code class="computeroutput">BZ_SEQUENCE_ERROR</code> if not.
949: <dt><span class="term"><code class="computeroutput">BZ_PARAM_ERROR</code></span></dt>
952:    <code class="computeroutput">BZ_SEQUENCE_ERROR</code>, this
954:    <code class="computeroutput">BZ_PARAM_ERROR</code> and
955:    <code class="computeroutput">BZ_SEQUENCE_ERROR</code> is a bit
957: <dt><span class="term"><code class="computeroutput">BZ_MEM_ERROR</code></span></dt>
962:    <code class="computeroutput">BZ2_bzDecompress</code> and
963:    <code class="computeroutput">BZ2_bzRead</code> may return
964:    <code class="computeroutput">BZ_MEM_ERROR</code> even though some
967:    <code class="computeroutput">BZ2_bzCompressInit</code> or
968:    <code class="computeroutput">BZ2_bzWriteOpen</code> have
970:    <code class="computeroutput">BZ_MEM_ERROR</code> cannot
972: <dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR</code></span></dt>
978: <dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR_MAGIC</code></span></dt>
980:    <code class="computeroutput">BZ_DATA_ERROR</code>, it is
982:    start with the correct magic bytes (<code class="computeroutput">'B' 'Z'
984: <dt><span class="term"><code class="computeroutput">BZ_IO_ERROR</code></span></dt>
986:    <code class="computeroutput">BZ2_bzRead</code> and
987:    <code class="computeroutput">BZ2_bzWrite</code> when there is an
989:    <code class="computeroutput">BZ2_bzReadOpen</code> and
990:    <code class="computeroutput">BZ2_bzWriteOpen</code> for attempts
992:    <code class="computeroutput">ferror(f)</code>) is set.  On
993:    receipt of <code class="computeroutput">BZ_IO_ERROR</code>, the
994:    caller should consult <code class="computeroutput">errno</code>
995:    and/or <code class="computeroutput">perror</code> to acquire
998: <dt><span class="term"><code class="computeroutput">BZ_UNEXPECTED_EOF</code></span></dt>
1000:    <code class="computeroutput">BZ2_bzRead</code> when the
1003: <dt><span class="term"><code class="computeroutput">BZ_OUTBUFF_FULL</code></span></dt>
1005:    <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
1006:    <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> to
1011: <div class="sect1" title="3.3. Low-level interface">
1012: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1014: <div class="sect2" title="3.3.1. BZ2_bzCompressInit">
1015: <div class="titlepage"><div><div><h3 class="title">
1017: <pre class="programlisting">typedef struct {
1040: <code class="computeroutput">bz_stream</code> structure holds all
1042: <code class="computeroutput">bz_stream</code> structure should be
1044: <code class="computeroutput">bz_stream</code> comprise the entirety
1045: of the user-visible data.  <code class="computeroutput">state</code>
1049: <code class="computeroutput">bzalloc</code>,
1050: <code class="computeroutput">bzfree</code>, and
1051: <code class="computeroutput">opaque</code>.  The value
1052: <code class="computeroutput">opaque</code> is passed to as the first
1053: argument to all calls to <code class="computeroutput">bzalloc</code>
1054: and <code class="computeroutput">bzfree</code>, but is otherwise
1055: ignored by the library.  The call <code class="computeroutput">bzalloc (
1057: <code class="computeroutput">p</code> to <code class="computeroutput">n *
1058: m</code> bytes of memory, and <code class="computeroutput">bzfree (
1061: <code class="computeroutput">bzalloc</code>,
1062: <code class="computeroutput">bzfree</code> and
1063: <code class="computeroutput">opaque</code> to
1064: <code class="computeroutput">NULL</code>, and the library will then
1065: use the standard <code class="computeroutput">malloc</code> /
1066: <code class="computeroutput">free</code> routines.</p>
1068: <code class="computeroutput">BZ2_bzCompressInit</code>, fields
1069: <code class="computeroutput">bzalloc</code>,
1070: <code class="computeroutput">bzfree</code> and
1071: <code class="computeroutput">opaque</code> should be filled
1074: <code class="computeroutput">total_in_lo32</code>,
1075: <code class="computeroutput">total_in_hi32</code>,
1076: <code class="computeroutput">total_out_lo32</code> and
1077: <code class="computeroutput">total_out_hi32</code> will have been
1082: platforms, using the <code class="computeroutput">_hi32</code>
1084: the total amount of data in is <code class="computeroutput">(total_in_hi32
1086: <p>Parameter <code class="computeroutput">blockSize100k</code>
1091: <p>Parameter <code class="computeroutput">verbosity</code> should
1095: <code class="computeroutput">-DBZ_NO_STDIO</code>, no such output
1097: <p>Parameter <code class="computeroutput">workFactor</code>
1105: <p>Lower values of <code class="computeroutput">workFactor</code>
1124: <pre class="programlisting">BZ_CONFIG_ERROR
1136: <pre class="programlisting">BZ2_bzCompress
1140: <div class="sect2" title="3.3.2. BZ2_bzCompress">
1141: <div class="titlepage"><div><div><h3 class="title">
1143: <pre class="programlisting">int BZ2_bzCompress ( bz_stream *strm, int action );</pre>
1146: calls <code class="computeroutput">BZ2_bzCompress</code> to transfer
1149: <code class="computeroutput">BZ2_bzCompress</code>,
1150: <code class="computeroutput">next_in</code> should point at the data
1151: to be compressed, and <code class="computeroutput">avail_in</code>
1153: <code class="computeroutput">BZ2_bzCompress</code> updates
1154: <code class="computeroutput">next_in</code>,
1155: <code class="computeroutput">avail_in</code> and
1156: <code class="computeroutput">total_in</code> to reflect the number
1158: <p>Similarly, <code class="computeroutput">next_out</code> should
1160: with <code class="computeroutput">avail_out</code> indicating how
1162: <code class="computeroutput">BZ2_bzCompress</code> updates
1163: <code class="computeroutput">next_out</code>,
1164: <code class="computeroutput">avail_out</code> and
1165: <code class="computeroutput">total_out</code> to reflect the number
1169: <code class="computeroutput">BZ2_bzCompress</code>.  In the limit,
1175: <code class="computeroutput">BZ2_bzCompress</code> is to request a
1180: (<code class="computeroutput">BZ2_bzCompressInit</code>) and after
1181: termination (<code class="computeroutput">BZ2_bzCompressEnd</code>),
1184: (<code class="computeroutput">BZ2_bzCompressInit</code>), the stream
1186: <code class="computeroutput">BZ2_bzCompress</code> should pass
1187: <code class="computeroutput">BZ_RUN</code> as the requested action;
1189: <code class="computeroutput">BZ_SEQUENCE_ERROR</code>.</p>
1194: <code class="computeroutput">BZ2_bzCompress</code> will no longer
1196: <code class="computeroutput">next_in</code>, but it will want to
1197: write data to <code class="computeroutput">next_out</code>.  Because
1201: <code class="computeroutput">BZ2_bzCompress</code>.</p>
1203: <code class="computeroutput">BZ_FINISH</code> as an action to
1204: <code class="computeroutput">BZ2_bzCompress</code>.  This changes
1206: <code class="computeroutput">next_in[0 .. avail_in-1]</code>) is
1208: <code class="computeroutput">BZ2_bzCompress</code> must be called
1210: point, <code class="computeroutput">BZ2_bzCompress</code> returns
1211: <code class="computeroutput">BZ_STREAM_END</code>, and the stream's
1213: <code class="computeroutput">BZ2_bzCompressEnd</code> should then be
1216: library makes a note of <code class="computeroutput">avail_in</code>
1218: <code class="computeroutput">BZ2_bzCompress</code> which has
1219: <code class="computeroutput">BZ_FINISH</code> as an action (ie, at
1222: <code class="computeroutput">avail_in</code> over subsequent calls
1223: to <code class="computeroutput">BZ2_bzCompress</code>, the library
1226: <code class="computeroutput">BZ_SEQUENCE_ERROR</code>.  This
1229: <code class="computeroutput">BZ2_bzCompress</code> to take all the
1233: finishing: call <code class="computeroutput">BZ2_bzCompress</code>
1234: with an action of <code class="computeroutput">BZ_FLUSH</code>,
1236: <code class="computeroutput">BZ_FLUSH</code> action until the value
1237: <code class="computeroutput">BZ_RUN</code> is returned.  As with
1238: finishing, <code class="computeroutput">BZ2_bzCompress</code>
1249: <code class="computeroutput">BZ2_bzCompress</code>.</p>
1250: <pre class="programlisting">IDLE/any
1299: <div class="orderedlist"><ol class="orderedlist" type="1">
1300: <li class="listitem"><p>Get started with
1301:   <code class="computeroutput">BZ2_bzCompressInit</code>.</p></li>
1302: <li class="listitem"><p>Shovel data in and shlurp out its compressed form
1304:   <code class="computeroutput">BZ2_bzCompress</code> with action =
1305:   <code class="computeroutput">BZ_RUN</code>.</p></li>
1306: <li class="listitem"><p>Finish up. Repeatedly call
1307:   <code class="computeroutput">BZ2_bzCompress</code> with action =
1308:   <code class="computeroutput">BZ_FINISH</code>, copying out the
1310:   <code class="computeroutput">BZ_STREAM_END</code> is
1312: <li class="listitem"><p>Close up and go home.  Call
1313:   <code class="computeroutput">BZ2_bzCompressEnd</code>.</p></li>
1317: <code class="computeroutput">BZ2_bzCompress ( ..., BZ_RUN )</code>
1318: and just do the <code class="computeroutput">BZ2_bzCompress ( ..., BZ_FINISH
1321: <code class="computeroutput">BZ2_bzCompressInit</code>.  The
1324: <code class="computeroutput">BZ2_bzCompress</code> calls.  If you
1326: <code class="computeroutput">BZ_SEQUENCE_ERROR</code>, and indicate
1329: <pre class="programlisting">BZ_PARAM_ERROR
1332: <div class="sect2" title="3.3.3. BZ2_bzCompressEnd">
1333: <div class="titlepage"><div><div><h3 class="title">
1335: <pre class="programlisting">int BZ2_bzCompressEnd ( bz_stream *strm );</pre>
1339: <pre class="programlisting">BZ_PARAM_ERROR  if strm is NULL or strm-&gt;s is NULL
1342: <div class="sect2" title="3.3.4. BZ2_bzDecompressInit">
1343: <div class="titlepage"><div><div><h3 class="title">
1345: <pre class="programlisting">int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );</pre>
1347: <code class="computeroutput">BZ2_bzCompressInit</code>, a
1348: <code class="computeroutput">bz_stream</code> record should be
1350: <code class="computeroutput">bzalloc</code>,
1351: <code class="computeroutput">bzfree</code> and
1352: <code class="computeroutput">opaque</code> should be set if a custom
1354: <code class="computeroutput">NULL</code> for the normal
1355: <code class="computeroutput">malloc</code> /
1356: <code class="computeroutput">free</code> routines.  Upon return, the
1358: <code class="computeroutput">total_in</code> and
1359: <code class="computeroutput">total_out</code> will be zero.</p>
1361: <code class="computeroutput">verbosity</code>, see
1362: <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1363: <p>If <code class="computeroutput">small</code> is nonzero, the
1367: requirement drops to around 2300k).  See <a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a>
1372: <code class="computeroutput">BZ2_bzDecompressInit</code> succeeds, a
1373: subsequent <code class="computeroutput">BZ2_bzDecompress</code>
1375: <code class="computeroutput">BZ_MEM_ERROR</code>.</p>
1377: <pre class="programlisting">BZ_CONFIG_ERROR
1385: <pre class="programlisting">BZ2_bzDecompress
1389: <div class="sect2" title="3.3.5. BZ2_bzDecompress">
1390: <div class="titlepage"><div><div><h3 class="title">
1392: <pre class="programlisting">int BZ2_bzDecompress ( bz_stream *strm );</pre>
1395: <code class="computeroutput">BZ2_bzDecompress</code> to transfer
1398: <code class="computeroutput">BZ2_bzDecompress</code>,
1399: <code class="computeroutput">next_in</code> should point at the
1400: compressed data, and <code class="computeroutput">avail_in</code>
1402: <code class="computeroutput">BZ2_bzDecompress</code> updates
1403: <code class="computeroutput">next_in</code>,
1404: <code class="computeroutput">avail_in</code> and
1405: <code class="computeroutput">total_in</code> to reflect the number
1407: <p>Similarly, <code class="computeroutput">next_out</code> should
1409: placed, with <code class="computeroutput">avail_out</code>
1411: <code class="computeroutput">BZ2_bzCompress</code> updates
1412: <code class="computeroutput">next_out</code>,
1413: <code class="computeroutput">avail_out</code> and
1414: <code class="computeroutput">total_out</code> to reflect the number
1418: <code class="computeroutput">BZ2_bzDecompress</code>.  In the limit,
1423: <p>Use of <code class="computeroutput">BZ2_bzDecompress</code> is
1425: <code class="computeroutput">BZ2_bzCompress</code>.</p>
1428: <code class="computeroutput">BZ2_bzDecompress</code> until
1429: <code class="computeroutput">BZ_STREAM_END</code> is returned.
1430: Appearance of <code class="computeroutput">BZ_STREAM_END</code>
1431: denotes that <code class="computeroutput">BZ2_bzDecompress</code>
1433: <code class="computeroutput">BZ2_bzDecompress</code> will not
1434: produce <code class="computeroutput">BZ_STREAM_END</code> until all
1436: <code class="computeroutput">BZ_STREAM_END</code> appears, you are
1438: <code class="computeroutput">BZ2_bzDecompressEnd</code> can safely
1441: <code class="computeroutput">BZ2_bzDecompressEnd</code> to clean up
1444: <pre class="programlisting">BZ_PARAM_ERROR
1459: <pre class="programlisting">BZ2_bzDecompress
1464: <div class="sect2" title="3.3.6. BZ2_bzDecompressEnd">
1465: <div class="titlepage"><div><div><h3 class="title">
1467: <pre class="programlisting">int BZ2_bzDecompressEnd ( bz_stream *strm );</pre>
1471: <pre class="programlisting">BZ_PARAM_ERROR
1476: <pre class="programlisting">  None.</pre>
1479: <div class="sect1" title="3.4. High-level interface">
1480: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1483: <code class="computeroutput">bzip2</code> format files.  First, some
1485: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
1486: <li class="listitem" style="list-style-type: disc"><p>All of the functions take an
1487:   <code class="computeroutput">int*</code> first argument,
1488:   <code class="computeroutput">bzerror</code>.  After each call,
1489:   <code class="computeroutput">bzerror</code> should be consulted
1491:   <code class="computeroutput">bzerror</code> is
1492:   <code class="computeroutput">BZ_OK</code>, the call completed
1495:   <code class="computeroutput">bzerror</code> is
1496:   <code class="computeroutput">BZ_IO_ERROR</code>, there was an
1498:   should then consult <code class="computeroutput">errno</code> /
1499:   <code class="computeroutput">perror</code> to determine the cause
1500:   of the difficulty.  <code class="computeroutput">bzerror</code>
1503: <li class="listitem" style="list-style-type: disc"><p>If <code class="computeroutput">bzerror</code> indicates
1505:   <code class="computeroutput">BZ_OK</code> and
1506:   <code class="computeroutput">BZ_STREAM_END</code>), you should
1508:   <code class="computeroutput">BZ2_bzReadClose</code> (or
1509:   <code class="computeroutput">BZ2_bzWriteClose</code>, depending on
1513:   <code class="computeroutput">BZ2_bzReadClose</code>
1514:   (<code class="computeroutput">BZ2_bzWriteClose</code>) is
1516:   <code class="computeroutput">bzerror</code> should be checked
1518:   <code class="computeroutput">bzerror</code> indicates an error,
1519:   <code class="computeroutput">BZ2_bzReadClose</code>
1520:   (<code class="computeroutput">BZ2_bzWriteClose</code>) should then
1522: <li class="listitem" style="list-style-type: disc"><p>The <code class="computeroutput">FILE*</code> arguments
1523:   passed to <code class="computeroutput">BZ2_bzReadOpen</code> /
1524:   <code class="computeroutput">BZ2_bzWriteOpen</code> should be set
1529: <li class="listitem" style="list-style-type: disc"><p>Memory allocation requests are handled by
1530:   <code class="computeroutput">malloc</code> /
1531:   <code class="computeroutput">free</code>.  At present there is no
1535: <div class="sect2" title="3.4.1. BZ2_bzReadOpen">
1536: <div class="titlepage"><div><div><h3 class="title">
1538: <pre class="programlisting">typedef void BZFILE;
1544: <code class="computeroutput">f</code>.
1545: <code class="computeroutput">f</code> should refer to a file which
1547: (<code class="computeroutput">ferror(f)</code>)is not set.  If
1548: <code class="computeroutput">small</code> is 1, the library will try
1551: <code class="computeroutput">BZ2_bzRead</code> will decompress the
1552: <code class="computeroutput">nUnused</code> bytes starting at
1553: <code class="computeroutput">unused</code>, before starting to read
1554: from the file <code class="computeroutput">f</code>.  At most
1555: <code class="computeroutput">BZ_MAX_UNUSED</code> bytes may be
1557: pass <code class="computeroutput">NULL</code> and
1558: <code class="computeroutput">0</code> for
1559: <code class="computeroutput">unused</code> and
1560: n<code class="computeroutput">Unused</code> respectively.</p>
1562: <code class="computeroutput">small</code> and
1563: <code class="computeroutput">verbosity</code>, see
1564: <code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
1567: possible that <code class="computeroutput">BZ2_bzReadOpen</code>
1568: returns <code class="computeroutput">BZ_OK</code> but a subsequent
1569: call of <code class="computeroutput">BZ2_bzRead</code> will return
1570: <code class="computeroutput">BZ_MEM_ERROR</code>.</p>
1572: <code class="computeroutput">bzerror</code>:</p>
1573: <pre class="programlisting">BZ_CONFIG_ERROR
1587: <pre class="programlisting">Pointer to an abstract BZFILE
1592: <pre class="programlisting">BZ2_bzRead
1597: <div class="sect2" title="3.4.2. BZ2_bzRead">
1598: <div class="titlepage"><div><div><h3 class="title">
1600: <pre class="programlisting">int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
1601: <p>Reads up to <code class="computeroutput">len</code>
1603: <code class="computeroutput">b</code> into the buffer
1604: <code class="computeroutput">buf</code>.  If the read was
1605: successful, <code class="computeroutput">bzerror</code> is set to
1606: <code class="computeroutput">BZ_OK</code> and the number of bytes
1608: <code class="computeroutput">bzerror</code> will be set to
1609: <code class="computeroutput">BZ_STREAM_END</code>, and the number of
1611: <code class="computeroutput">bzerror</code> values denote an
1613: <p><code class="computeroutput">BZ2_bzRead</code> will supply
1614: <code class="computeroutput">len</code> bytes, unless the logical
1619: check <code class="computeroutput">bzerror</code> after every call
1621: <code class="computeroutput">BZ_STREAM_END</code>.</p>
1622: <p>Internally, <code class="computeroutput">BZ2_bzRead</code>
1624: <code class="computeroutput">BZ_MAX_UNUSED</code> bytes before
1627: <code class="computeroutput">BZ2_bzRead</code> will almost certainly
1629: <code class="computeroutput">BZ_SEQUENCE_END</code>.  To collect the
1631: <code class="computeroutput">BZ_SEQUENCE_END</code> has appeared,
1632: call <code class="computeroutput">BZ2_bzReadGetUnused</code>
1634: <code class="computeroutput">BZ2_bzReadClose</code>.</p>
1636: <code class="computeroutput">bzerror</code>:</p>
1637: <pre class="programlisting">BZ_PARAM_ERROR
1659: <pre class="programlisting">number of bytes read
1664: <pre class="programlisting">collect data from buf, then BZ2_bzRead or BZ2_bzReadClose
1671: <div class="sect2" title="3.4.3. BZ2_bzReadGetUnused">
1672: <div class="titlepage"><div><div><h3 class="title">
1674: <pre class="programlisting">void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b, 
1678: <code class="computeroutput">*unused</code> is set to the address of
1679: the data, and <code class="computeroutput">*nUnused</code> to the
1680: number of bytes.  <code class="computeroutput">*nUnused</code> will
1681: be set to a value between <code class="computeroutput">0</code> and
1682: <code class="computeroutput">BZ_MAX_UNUSED</code> inclusive.</p>
1684: <code class="computeroutput">BZ2_bzRead</code> has signalled
1685: <code class="computeroutput">BZ_STREAM_END</code> but before
1686: <code class="computeroutput">BZ2_bzReadClose</code>.</p>
1688: <code class="computeroutput">bzerror</code>:</p>
1689: <pre class="programlisting">BZ_PARAM_ERROR
1698: <pre class="programlisting">BZ2_bzReadClose</pre>
1700: <div class="sect2" title="3.4.4. BZ2_bzReadClose">
1701: <div class="titlepage"><div><div><h3 class="title">
1703: <pre class="programlisting">void BZ2_bzReadClose ( int *bzerror, BZFILE *b );</pre>
1705: <code class="computeroutput">b</code>.
1706: <code class="computeroutput">BZ2_bzReadClose</code> does not call
1707: <code class="computeroutput">fclose</code> on the underlying file
1709: <code class="computeroutput">BZ2_bzReadClose</code> should be called
1712: <code class="computeroutput">bzerror</code>:</p>
1713: <pre class="programlisting">BZ_SEQUENCE_ERROR
1718: <pre class="programlisting">none</pre>
1720: <div class="sect2" title="3.4.5. BZ2_bzWriteOpen">
1721: <div class="titlepage"><div><div><h3 class="title">
1723: <pre class="programlisting">BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f, 
1727: <code class="computeroutput">f</code>.
1728: <code class="computeroutput">f</code> should refer to a file which
1730: (<code class="computeroutput">ferror(f)</code>)is not set.</p>
1732: <code class="computeroutput">blockSize100k</code>,
1733: <code class="computeroutput">verbosity</code> and
1734: <code class="computeroutput">workFactor</code>, see
1735: <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1738: <code class="computeroutput">BZ_MEM_ERROR</code> cannot be signalled
1740: <code class="computeroutput">BZ2_bzWrite</code>.</p>
1742: <code class="computeroutput">bzerror</code>:</p>
1743: <pre class="programlisting">BZ_CONFIG_ERROR
1755: <pre class="programlisting">Pointer to an abstract BZFILE
1760: <pre class="programlisting">BZ2_bzWrite
1766: <div class="sect2" title="3.4.6. BZ2_bzWrite">
1767: <div class="titlepage"><div><div><h3 class="title">
1769: <pre class="programlisting">void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
1770: <p>Absorbs <code class="computeroutput">len</code> bytes from the
1771: buffer <code class="computeroutput">buf</code>, eventually to be
1774: <code class="computeroutput">bzerror</code>:</p>
1775: <pre class="programlisting">BZ_PARAM_ERROR
1784: <div class="sect2" title="3.4.7. BZ2_bzWriteClose">
1785: <div class="titlepage"><div><div><h3 class="title">
1787: <pre class="programlisting">void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
1799: far supplied by <code class="computeroutput">BZ2_bzWrite</code>.
1801: calls to <code class="computeroutput">BZ2_bzWrite</code> are
1803: <code class="computeroutput">b</code> is released.
1804: <code class="computeroutput">fflush</code> is called on the
1806: <code class="computeroutput">fclose</code>'d.</p>
1807: <p>If <code class="computeroutput">BZ2_bzWriteClose</code> is
1812: <code class="computeroutput">fflush</code> the compressed file.  You
1815: <code class="computeroutput">abandon</code>.</p>
1816: <p>If <code class="computeroutput">nbytes_in</code> is non-null,
1817: <code class="computeroutput">*nbytes_in</code> will be set to be the
1819: <code class="computeroutput">nbytes_out</code> will be set to the
1822: <code class="computeroutput">BZ2_bzWriteClose</code> only yields the
1824: <code class="computeroutput">BZ2_bzWriteClose64</code> if you want
1828: <code class="computeroutput">bzerror</code>:</p>
1829: <pre class="programlisting">BZ_SEQUENCE_ERROR
1836: <div class="sect2" title="3.4.8. Handling embedded compressed data streams">
1837: <div class="titlepage"><div><div><h3 class="title">
1840: <code class="computeroutput">bzip2</code> data streams which form
1842: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
1843: <li class="listitem" style="list-style-type: disc"><p>For writing, the library takes an open file handle,
1845:   <code class="computeroutput">fflush</code>es it but does not
1846:   <code class="computeroutput">fclose</code> it.  The calling
1849: <li class="listitem" style="list-style-type: disc"><p>Reading is more complex, and the facilities are not as
1851:   with efficiency.  <code class="computeroutput">BZ2_bzRead</code>
1853:   <code class="computeroutput">BZ_MAX_UNUSED</code> bytes, and in
1856:   call <code class="computeroutput">BZ2_bzReadGetUnused</code> after
1857:   the last call of <code class="computeroutput">BZ2_bzRead</code>
1859:   <code class="computeroutput">BZ_STREAM_END</code>) but before
1861:   <code class="computeroutput">BZ2_bzReadClose</code>.</p></li>
1864: <code class="computeroutput">bzip2</code> streams placed end-to-end.
1866: <code class="computeroutput">BZ2_bzRead</code> returns
1867: <code class="computeroutput">BZ_STREAM_END</code>, call
1868: <code class="computeroutput">BZ2_bzReadGetUnused</code> to collect
1872: <code class="computeroutput">BZ2_bzReadOpen</code> again, feeding in
1873: the unused data via the <code class="computeroutput">unused</code> /
1874: <code class="computeroutput">nUnused</code> parameters.  Keep doing
1875: this until <code class="computeroutput">BZ_STREAM_END</code> return
1877: (<code class="computeroutput">feof(f)</code>).  In this situation
1878: <code class="computeroutput">BZ2_bzReadGetUnused</code> will of
1885: <div class="sect2" title="3.4.9. Standard file-reading/writing code">
1886: <div class="titlepage"><div><div><h3 class="title">
1889: <pre class="programlisting">FILE*   f;
1920: <pre class="programlisting">FILE*   f;
1952: <div class="sect1" title="3.5. Utility functions">
1953: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1955: <div class="sect2" title="3.5.1. BZ2_bzBuffToBuffCompress">
1956: <div class="titlepage"><div><div><h3 class="title">
1958: <pre class="programlisting">int BZ2_bzBuffToBuffCompress( char*         dest,
1965: <p>Attempts to compress the data in <code class="computeroutput">source[0
1967: <code class="computeroutput">dest[0 .. *destLen-1]</code>.  If the
1969: <code class="computeroutput">*destLen</code> is set to the size of
1970: the compressed data, and <code class="computeroutput">BZ_OK</code>
1972: <code class="computeroutput">*destLen</code> is unchanged, and
1973: <code class="computeroutput">BZ_OUTBUFF_FULL</code> is
1977: complete <code class="computeroutput">bzip2</code> format data
1982: <code class="computeroutput">blockSize100k</code>,
1983: <code class="computeroutput">verbosity</code> and
1984: <code class="computeroutput">workFactor</code>, see
1985: <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1989: <p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
1991: <code class="computeroutput">dest[*destLen]</code>, even in case of
1994: <pre class="programlisting">BZ_CONFIG_ERROR
2008: <div class="sect2" title="3.5.2. BZ2_bzBuffToBuffDecompress">
2009: <div class="titlepage"><div><div><h3 class="title">
2011: <pre class="programlisting">int BZ2_bzBuffToBuffDecompress( char*         dest,
2017: <p>Attempts to decompress the data in <code class="computeroutput">source[0
2019: <code class="computeroutput">dest[0 .. *destLen-1]</code>.  If the
2021: <code class="computeroutput">*destLen</code> is set to the size of
2022: the uncompressed data, and <code class="computeroutput">BZ_OK</code>
2024: <code class="computeroutput">*destLen</code> is unchanged, and
2025: <code class="computeroutput">BZ_OUTBUFF_FULL</code> is
2027: <p><code class="computeroutput">source</code> is assumed to hold
2028: a complete <code class="computeroutput">bzip2</code> format data
2030: <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> tries
2034: <code class="computeroutput">small</code> and
2035: <code class="computeroutput">verbosity</code>, see
2036: <code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
2043: <p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
2045: <code class="computeroutput">dest[*destLen]</code>, even in case of
2048: <pre class="programlisting">BZ_CONFIG_ERROR
2068: <div class="sect1" title="3.6. zlib compatibility functions">
2069: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2072: better <code class="computeroutput">zlib</code> compatibility.
2073: These functions are <code class="computeroutput">BZ2_bzopen</code>,
2074: <code class="computeroutput">BZ2_bzread</code>,
2075: <code class="computeroutput">BZ2_bzwrite</code>,
2076: <code class="computeroutput">BZ2_bzflush</code>,
2077: <code class="computeroutput">BZ2_bzclose</code>,
2078: <code class="computeroutput">BZ2_bzerror</code> and
2079: <code class="computeroutput">BZ2_bzlibVersion</code>.  These
2083: <pre class="programlisting">typedef void BZFILE;
2087: <pre class="programlisting">BZFILE * BZ2_bzopen  ( const char *path, const char *mode );
2089: <p>Opens a <code class="computeroutput">.bz2</code> file for
2091: descriptor.  Analogous to <code class="computeroutput">fopen</code>
2092: and <code class="computeroutput">fdopen</code>.</p>
2093: <pre class="programlisting">int BZ2_bzread  ( BZFILE* b, void* buf, int len );
2096: <code class="computeroutput">BZFILE</code>.  Analogous to
2097: <code class="computeroutput">fread</code> and
2098: <code class="computeroutput">fwrite</code>.</p>
2099: <pre class="programlisting">int  BZ2_bzflush ( BZFILE* b );
2101: <p>Flushes/closes a <code class="computeroutput">BZFILE</code>.
2102: <code class="computeroutput">BZ2_bzflush</code> doesn't actually do
2103: anything.  Analogous to <code class="computeroutput">fflush</code>
2104: and <code class="computeroutput">fclose</code>.</p>
2105: <pre class="programlisting">const char * BZ2_bzerror ( BZFILE *b, int *errnum )</pre>
2107: <code class="computeroutput">b</code>, and also sets
2108: <code class="computeroutput">*errnum</code> to its numerical
2111: <div class="sect1" title="3.7. Using the library in a stdio-free environment">
2112: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2114: <div class="sect2" title="3.7.1. Getting rid of stdio">
2115: <div class="titlepage"><div><div><h3 class="title">
2120: <code class="computeroutput">BZ_NO_STDIO</code> defined.  Doing this
2123: <p><code class="computeroutput">BZ2_bzCompressInit</code>,
2124: <code class="computeroutput">BZ2_bzCompress</code>,
2125: <code class="computeroutput">BZ2_bzCompressEnd</code>
2126: <code class="computeroutput">BZ2_bzDecompressInit</code>,
2127: <code class="computeroutput">BZ2_bzDecompress</code>,
2128: <code class="computeroutput">BZ2_bzDecompressEnd</code>
2129: <code class="computeroutput">BZ2_bzBuffToBuffCompress</code>,
2130: <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></p>
2132: <code class="computeroutput">verbosity</code> settings.</p>
2134: <div class="sect2" title="3.7.2. Critical error handling">
2135: <div class="titlepage"><div><div><h3 class="title">
2137: <p><code class="computeroutput">libbzip2</code> contains a number
2141: <code class="computeroutput">BZ_NO_STDIO</code> set.</p>
2144: <div class="blockquote"><blockquote class="blockquote">
2155: <p>where <code class="computeroutput">N</code> is some error code
2156: number.  If <code class="computeroutput">N == 1007</code>, it also
2160: <p><code class="computeroutput">exit(3)</code> is then
2162: <p>For a <code class="computeroutput">stdio</code>-free library,
2165: <pre class="programlisting">extern void bz_internal_error ( int errcode );</pre>
2169: <code class="computeroutput">bz_stream</code> records involved can
2179: <div class="sect1" title="3.8. Making a Windows DLL">
2180: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2184: (<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>), so
2186: <code class="computeroutput">jseward@bzip.org</code>).</p>
2189: <code class="computeroutput">libbz2.dsp</code>, and build.  That's
2193: <code class="computeroutput">blocksort.c</code>,
2194: <code class="computeroutput">bzlib.c</code>,
2195: <code class="computeroutput">compress.c</code>,
2196: <code class="computeroutput">crctable.c</code>,
2197: <code class="computeroutput">decompress.c</code>,
2198: <code class="computeroutput">huffman.c</code>,
2199: <code class="computeroutput">randtable.c</code> and
2200: <code class="computeroutput">libbz2.def</code>.  You will also need
2201: to name the header files <code class="computeroutput">bzlib.h</code>
2202: and <code class="computeroutput">bzlib_private.h</code>.</p>
2205: <code class="computeroutput">_WIN32</code>.</p>
2206: <p>Finally, <code class="computeroutput">dlltest.c</code> is a
2208: <code class="computeroutput">dlltest.dsp</code>.</p>
2210: <code class="computeroutput">makefile.msc</code>.</p>
2212: <code class="computeroutput">bzip2</code> itself on Win32, you must
2213: set <code class="computeroutput">BZ_UNIX</code> to 0 and
2214: <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the file
2215: <code class="computeroutput">bzip2.c</code>, before compiling.
2221: <div class="chapter" title="4. Miscellanea">
2222: <div class="titlepage"><div><div><h2 class="title">
2224: <div class="toc">
2227: <dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
2228: <dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
2229: <dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
2230: <dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
2231: <dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
2236: <div class="sect1" title="4.1. Limitations of the compressed file format">
2237: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2239: <p><code class="computeroutput">bzip2-1.0.X</code>,
2240: <code class="computeroutput">0.9.5</code> and
2241: <code class="computeroutput">0.9.0</code> use exactly the same file
2243: <code class="computeroutput">bzip2-0.1</code>.  This decision was
2249: <code class="computeroutput">bzip2-0.1</code> in August 1997 has
2253: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
2254: <li class="listitem" style="list-style-type: disc"><p>The run-length encoder, which is the first of the
2261: <li class="listitem" style="list-style-type: disc">
2270:    it to be slower than <code class="computeroutput">bzip2</code>'s
2275:    <code class="computeroutput">bzip2-0.1</code>'s performance on
2284: <li class="listitem" style="list-style-type: disc"><p>The compressed file format was never designed to be
2288:    <code class="computeroutput">decompress.c</code> through the C
2292: <li class="listitem" style="list-style-type: disc"><p>An Adler-32 checksum, rather than a CRC32 checksum,
2296: <code class="computeroutput">bzip2</code> format was frozen before I
2301: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
2302: <li class="listitem" style="list-style-type: disc"><p>Single array implementation of the inverse BWT.  This
2305: <li class="listitem" style="list-style-type: disc"><p>Faster inverse MTF transform for large MTF values.
2308: <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2-0.9.0</code> now reads
2309:   and writes files with <code class="computeroutput">fread</code>
2310:   and <code class="computeroutput">fwrite</code>; version 0.1 used
2311:   <code class="computeroutput">putc</code> and
2312:   <code class="computeroutput">getc</code>.  Duh!  Well, you live
2319: <div class="sect1" title="4.2. Portability issues">
2320: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2323: <code class="computeroutput">autoconf</code> to configure 0.9.5 or
2325: <p><code class="computeroutput">autoconf</code>, admirable and
2328: <code class="computeroutput">bzip2</code> doesn't have much in the
2331: systems.  <code class="computeroutput">autoconf</code> doesn't help
2338: <code class="computeroutput">__inline__</code> directives in the
2339: code.  GNU C (<code class="computeroutput">gcc</code>) should be
2343: <code class="computeroutput">#define</code>
2344: <code class="computeroutput">__inline__</code> to be
2345: <code class="computeroutput">/* */</code>.  One easy way to do this
2347: <code class="computeroutput">-D__inline__=</code>, which should be
2350: macro <code class="computeroutput">BZ_STRICT_ANSI</code> defined.
2354: <code class="computeroutput">bzip2</code>'s checks against
2359: <code class="computeroutput">bzip2</code> binary for public distribution,
2360: please consider linking it statically (<code class="computeroutput">gcc
2363: <p>If you build <code class="computeroutput">bzip2</code> on
2364: Win32, you must set <code class="computeroutput">BZ_UNIX</code> to 0
2365: and <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the
2366: file <code class="computeroutput">bzip2.c</code>, before compiling.
2369: <div class="sect1" title="4.3. Reporting bugs">
2370: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2373: <code class="computeroutput">bzip2</code> is bug free, both by
2376: <p>Nevertheless, if <code class="computeroutput">bzip2</code> dies
2382: <div class="itemizedlist"><ul class="itemizedlist" type="bullet">
2383: <li class="listitem" style="list-style-type: disc">
2388:   <code class="computeroutput">bzip2</code>, and I've run across two
2393:   <code class="computeroutput">-O2</code>
2394:   <code class="computeroutput">-fomit-frame-pointer</code>
2395:   <code class="computeroutput">-fno-strength-reduce</code>.  You
2396:   should specifically <span class="emphasis"><em>not</em></span> use
2397:   <code class="computeroutput">-funroll-loops</code>.</p>
2403: <li class="listitem" style="list-style-type: disc">
2404: <p>If <code class="computeroutput">bzip2</code>
2407:   <code class="computeroutput">bzip2</code> really hammers your
2414: <li class="listitem" style="list-style-type: disc"><p>This isn't really a bug, but ... If
2415:   <code class="computeroutput">bzip2</code> tells you your file is
2423: <code class="computeroutput">libbzip2</code> into your own program
2432: <pre class="programlisting">bzip2 crashed with segmentation fault on my machine</pre>
2434: report is <span class="emphasis"><em>totally, utterly, completely and
2441: <pre class="programlisting">Machine type.  Operating system version.  
2450: <div class="sect1" title="4.4. Did you get the right package?">
2451: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2453: <p><code class="computeroutput">bzip2</code> is a resource hog.
2465: work, <code class="computeroutput">zlib-1.2.1</code> and
2466: <code class="computeroutput">gzip-1.2.4</code>.  Look for them at 
2467: <a class="ulink" href="http://www.zlib.org" target="_top">http://www.zlib.org</a> and 
2468: <a class="ulink" href="http://www.gzip.org" target="_top">http://www.gzip.org</a>
2471: X J Oberhumer's <code class="computeroutput">LZO</code> real-time
2473: <a class="ulink" href="http://www.oberhumer.com/opensource" target="_top">http://www.oberhumer.com/opensourc...(10 bytes skipped)...
2475: <div class="sect1" title="4.5. Further Reading">
2476: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2478: <p><code class="computeroutput">bzip2</code> is not research
2483: <code class="computeroutput">bzip2</code>:</p>
2484: <div class="literallayout"><p>Michael Burrows and D. J. Wheeler:<br>
2511: <div class="literallayout"><p>Peter Fenwick:<br>
2518: <div class="literallayout"><p>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz<br>
2522: <div class="literallayout"><p>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps<br>
2527: <div class="literallayout"><p>Julian Seward<br>
2433: <p>and absolutely nothing else.  Needless to say, a such a
chromium.googlesource.com/devtools/devtools-frontend:node_modules/karma-typescript/node_modules/source-map/lib/source-map-consumer.js: [ master, ]
17: class SourceMapConsumer {
20:     // Yes, this is a hack to retain the pre-existing API of the base-class
199: class BasicSourceMapConsumer extends SourceMapConsumer {
747: class IndexedSourceMapConsumer extends SourceMapConsumer {
922:       function(aNeedle, section) {
923:         const cmp = aNeedle.generatedLine - section.generatedOffset.generatedLine;
928:         return (aNeedle.generatedColumn -
1124:   _findMapping(aNeedle, aMappings, aLineName,
1131:     if (aNeedle[aLineName] <= 0) {
1133:                           + aNeedle[aLineName]);
1135:     if (aNeedle[aColumnName] < 0) {
1137:                           + aNeedle[aColumnName]);
1140:     return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
1237:  * Cheat to get around inter-twingled classes.  `factory()` can be at the end
1238:  * where it has access to non-hoisted classes, but it gets hoisted itself.
99:     throw new Error("Subclasses must implement _parseMappings");
119:     throw new Error("Subclasses must implement eachMapping");
145:     throw new Error("Subclasses must implement allGeneratedPositionsFor");
149:     throw new Error("Subclasses must implement destroy");
github.com/apache/trafodion:core/sql/export/FBString.h: [ master, ]
33:    uses the "mutable" storage class for its own state).
115: template <class InIt, class OutIt>
127: template <class Pod, class T>
159: template <class Pod>
170: template <class Pod>
184: //enum class AcquireMallocatedString {};
188:  * signatures of a fbstring core. The fbstring class itself uses such
196: template <class Char>
197: class fbstring_core_model {
373: template <class Char> class fbstring_core {
451:     // if h is uninitialized, then use the (derived) string class's default heap instead
1028: template <class Char>
1029: class dummy_fbstring_core {
1085: template <typename E, class T, class A, class Storage>
1088:           class T = std::char_traits<E>,
1089:           class A = std::allocator<E>,
1090:           class Storage = fbstring_core<E> >
1092: class basic_fbstring {
1219:   template <class InIt>
1548:   template<class InputIterator>
1605:   template <class ItOrLength, class ItOrChar>
1644:   template <int i> class Selector {};
1676:   template<class InputIter>
1683:   template <class FwdIterator>
1724:   template <class InputIterator>
1739:   template <class ItOrLength, class ItOrChar>
1801:   template <class StrOrLength, class NumOrChar>
1844:   template <class InputIter>
1854:   template <class FwdIterator, class P>
1860:   template <class FwdIterator>
1878:   template <class FwdIterator>
1907:   template <class InputIterator>
1916:   template <class T1, class T2>
2227: template <typename E, class T, class A, class S>
2239: template <typename E, class T, class A, class S>
2247: template <typename E, class T, class A, class S>
2261: template <typename E, class T, class A, class S>
2268: template <typename E, class T, class A, class S>
2282: template <typename E, class T, class A, class S>
2295: template <typename E, class T, class A, class S>
2311: template <typename E, class T, class A, class S>
2324: template <typename E, class T, class A, class S>
2330: template <typename E, class T, class A, class S>
2336: template <typename E, class T, class A, class S>
2342: template <typename E, class T, class A, class S>
2348: template <typename E, class T, class A, class S>
2354: template <typename E, class T, class A, class S>
2360: template <typename E, class T, class A, class S>
2366: template <typename E, class T, class A, class S>
2372: template <typename E, class T, class A, class S>
2378: template <typename E, class T, class A, class S>
2384: template <typename E, class T, class A, class S>
2390: template <typename E, class T, class A, class S>
2396: template <typename E, class T, class A, class S>
2402: template <typename E, class T, class A, class S>
2408: template <typename E, class T, class A, class S>
2414: template <typename E, class T, class A, class S>
2420: template <typename E, class T, class A, class S>
2426: template <typename E, class T, class A, class S>
2434: template <typename E, class T, class A, class S>
2440: template <typename E, class T, class A, class S>
2482: template <typename E, class T, class A, class S>