├── .classpath ├── .gitattributes ├── .gitignore ├── COPYING ├── ChangeLog ├── FAQ.txt ├── LICENSE ├── README ├── README_QUICK.txt ├── Samples ├── TODO ├── contrib └── .gitignore ├── examples ├── CaffeineMarkEmbedded-src.diff ├── JCK_runtime_6a_lang_Test.java ├── d3caster-1_1_0-src.diff ├── jEdit42-rflg.dat ├── jclPPro10_ui-decomp.diff ├── jdk13_JavaSound-src.diff ├── jdk142_DrawTest-src.diff ├── jdk142_Java2Demo-src.diff ├── jdk142_SwingSet2-src.diff ├── misc_translation_cmds ├── simple │ ├── DynProxyTest.java │ ├── Empty1.java │ ├── Empty2.java │ ├── Empty3.java │ ├── Empty4.java │ ├── ExecTest.java │ ├── Hello.java │ ├── ListDir.java │ ├── PhantomUsage.java │ ├── QSort.java │ ├── RefsTest.java │ ├── ShowProp.java │ ├── ShowTZ.java │ ├── TestCtrlC.java │ ├── TestSQL.java │ ├── ThreadInterrupt.java │ └── TrigCompileAllVmClasses.java └── tuxguitar12-plugins-rflg.dat ├── goclsp ├── BoehmGC_README.txt ├── Classpath_LICENSE.txt ├── clsp_asc │ └── java │ │ └── io │ │ ├── BufferedWriter.java │ │ ├── ByteArrayOutputStream.java │ │ ├── File.java │ │ ├── InputStreamReader.java │ │ ├── OutputStreamWriter.java │ │ ├── PrintStream.java │ │ └── PrintWriter.java ├── clsp_fix │ ├── gnu │ │ ├── classpath │ │ │ ├── ServiceFactory.java │ │ │ ├── SystemProperties.java │ │ │ └── tools │ │ │ │ ├── common │ │ │ │ └── Messages.java │ │ │ │ └── getopt │ │ │ │ └── Messages.java │ │ ├── java │ │ │ ├── awt │ │ │ │ └── peer │ │ │ │ │ ├── gtk │ │ │ │ │ ├── GtkButtonPeer.java │ │ │ │ │ ├── GtkClipboardNotifier.java │ │ │ │ │ └── GtkImageConsumer.java │ │ │ │ │ ├── headless │ │ │ │ │ └── HeadlessGraphicsEnvironment.java │ │ │ │ │ └── qt │ │ │ │ │ ├── QtButtonPeer.java │ │ │ │ │ ├── QtCheckboxPeer.java │ │ │ │ │ ├── QtMenuItemPeer.java │ │ │ │ │ └── QtToolkit.java │ │ │ ├── io │ │ │ │ └── Base64InputStream.java │ │ │ ├── net │ │ │ │ ├── PlainSocketImpl.java │ │ │ │ ├── loader │ │ │ │ │ ├── FileURLLoader.java │ │ │ │ │ └── JarURLLoader.java │ │ │ │ └── protocol │ │ │ │ │ ├── file │ │ │ │ │ ├── Connection.java │ │ │ │ │ └── Handler.java │ │ │ │ │ └── http │ │ │ │ │ ├── HTTPConnection.java │ │ │ │ │ ├── HTTPURLConnection.java │ │ │ │ │ ├── Headers.java │ │ │ │ │ └── Request.java │ │ │ ├── nio │ │ │ │ ├── FileChannelImpl.java │ │ │ │ └── charset │ │ │ │ │ ├── Cp874.java │ │ │ │ │ ├── Provider.java │ │ │ │ │ ├── UTF_16.java │ │ │ │ │ └── UnicodeBig.java │ │ │ ├── security │ │ │ │ ├── Engine.java │ │ │ │ ├── Properties.java │ │ │ │ ├── der │ │ │ │ │ └── DERWriter.java │ │ │ │ ├── hash │ │ │ │ │ └── Whirlpool.java │ │ │ │ ├── jce │ │ │ │ │ └── sig │ │ │ │ │ │ ├── EncodedKeyFactory.java │ │ │ │ │ │ └── SignatureAdapter.java │ │ │ │ ├── key │ │ │ │ │ ├── dss │ │ │ │ │ │ ├── DSSKeyPairGenerator.java │ │ │ │ │ │ └── DSSKeyPairPKCS8Codec.java │ │ │ │ │ └── rsa │ │ │ │ │ │ ├── RSAKeyPairGenerator.java │ │ │ │ │ │ ├── RSAKeyPairPKCS8Codec.java │ │ │ │ │ │ └── RSAKeyPairX509Codec.java │ │ │ │ ├── pkcs │ │ │ │ │ ├── PKCS7SignedData.java │ │ │ │ │ └── SignerInfo.java │ │ │ │ ├── provider │ │ │ │ │ └── PKIXCertPathValidatorImpl.java │ │ │ │ ├── sig │ │ │ │ │ └── rsa │ │ │ │ │ │ ├── EMSA_PSS.java │ │ │ │ │ │ └── RSAPSSSignature.java │ │ │ │ └── x509 │ │ │ │ │ ├── X509CRL.java │ │ │ │ │ ├── X509CRLEntry.java │ │ │ │ │ ├── X509Certificate.java │ │ │ │ │ └── ext │ │ │ │ │ └── Extension.java │ │ │ └── util │ │ │ │ ├── WeakIdentityHashMap.java │ │ │ │ ├── jar │ │ │ │ └── JarUtils.java │ │ │ │ └── prefs │ │ │ │ └── FileBasedFactory.java │ │ ├── javax │ │ │ ├── crypto │ │ │ │ ├── key │ │ │ │ │ ├── dh │ │ │ │ │ │ └── GnuDHKeyPairGenerator.java │ │ │ │ │ └── srp6 │ │ │ │ │ │ └── SRPKeyPairGenerator.java │ │ │ │ └── prng │ │ │ │ │ └── CSPRNG.java │ │ │ ├── net │ │ │ │ └── ssl │ │ │ │ │ └── provider │ │ │ │ │ ├── CertificateRequest.java │ │ │ │ │ └── SSLSocket.java │ │ │ ├── print │ │ │ │ └── PrinterDialog.java │ │ │ ├── security │ │ │ │ └── auth │ │ │ │ │ └── login │ │ │ │ │ ├── ConfigFileParser.java │ │ │ │ │ ├── ConfigFileTokenizer.java │ │ │ │ │ └── GnuConfiguration.java │ │ │ └── swing │ │ │ │ └── plaf │ │ │ │ └── gnu │ │ │ │ └── GNULookAndFeel.java │ │ └── xml │ │ │ ├── dom │ │ │ ├── DomDocument.java │ │ │ └── ImplementationSource.java │ │ │ └── validation │ │ │ ├── relaxng │ │ │ └── FullSyntaxBuilder.java │ │ │ └── xmlschema │ │ │ ├── XMLSchemaBuilder.java │ │ │ └── XMLSchemaValidatorHandler.java │ ├── java │ │ ├── applet │ │ │ └── Applet.java │ │ ├── io │ │ │ ├── BufferedInputStream.java │ │ │ ├── BufferedOutputStream.java │ │ │ ├── BufferedReader.java │ │ │ ├── DataInputStream.java │ │ │ ├── File.java │ │ │ ├── FileOutputStream.java │ │ │ ├── FilterOutputStream.java │ │ │ ├── ObjectInputStream.java │ │ │ ├── ObjectOutputStream.java │ │ │ ├── ObjectStreamClass.java │ │ │ ├── OutputStreamWriter.java │ │ │ ├── PrintStream.java │ │ │ ├── PushbackInputStream.java │ │ │ ├── RandomAccessFile.java │ │ │ ├── Reader.java │ │ │ ├── StreamTokenizer.java │ │ │ └── Writer.java │ │ ├── lang │ │ │ ├── Boolean.java │ │ │ ├── Character.java │ │ │ ├── Double.java │ │ │ ├── ExceptionInInitializerError.java │ │ │ ├── Float.java │ │ │ ├── Integer.java │ │ │ ├── Long.java │ │ │ ├── Runtime.java │ │ │ ├── StackTraceElement.java │ │ │ ├── StrictMath.java │ │ │ ├── System.java │ │ │ ├── Thread.java │ │ │ ├── ThreadGroup.java │ │ │ ├── Throwable.java │ │ │ ├── ref │ │ │ │ └── SoftReference.java │ │ │ └── reflect │ │ │ │ ├── AccessibleObject.java │ │ │ │ ├── Array.java │ │ │ │ ├── Modifier.java │ │ │ │ └── Proxy.java │ │ ├── net │ │ │ ├── Inet6Address.java │ │ │ ├── InetAddress.java │ │ │ ├── MimeTypeMapper.java │ │ │ ├── ResolverCache.java │ │ │ ├── URI.java │ │ │ ├── URLClassLoader.java │ │ │ └── URLConnection.java │ │ ├── nio │ │ │ ├── Buffer.java │ │ │ ├── ByteBuffer.java │ │ │ ├── ByteBufferImpl.java │ │ │ ├── CharBuffer.java │ │ │ ├── CharBufferImpl.java │ │ │ ├── CharSequenceBuffer.java │ │ │ ├── CharViewBufferImpl.java │ │ │ ├── DirectByteBufferImpl.java │ │ │ ├── DoubleBuffer.java │ │ │ ├── DoubleBufferImpl.java │ │ │ ├── DoubleViewBufferImpl.java │ │ │ ├── FloatBuffer.java │ │ │ ├── FloatBufferImpl.java │ │ │ ├── FloatViewBufferImpl.java │ │ │ ├── IntBuffer.java │ │ │ ├── IntBufferImpl.java │ │ │ ├── IntViewBufferImpl.java │ │ │ ├── LongBuffer.java │ │ │ ├── LongBufferImpl.java │ │ │ ├── LongViewBufferImpl.java │ │ │ ├── MappedByteBuffer.java │ │ │ ├── ShortBuffer.java │ │ │ ├── ShortBufferImpl.java │ │ │ ├── ShortViewBufferImpl.java │ │ │ ├── channels │ │ │ │ ├── Channel.java │ │ │ │ └── FileLock.java │ │ │ └── charset │ │ │ │ ├── Charset.java │ │ │ │ ├── CharsetDecoder.java │ │ │ │ └── CharsetEncoder.java │ │ ├── security │ │ │ ├── BasicPermission.java │ │ │ ├── SecureRandom.java │ │ │ └── Security.java │ │ ├── sql │ │ │ ├── Date.java │ │ │ ├── Time.java │ │ │ └── Timestamp.java │ │ ├── text │ │ │ ├── Bidi.java │ │ │ ├── BreakIterator.java │ │ │ ├── ChoiceFormat.java │ │ │ ├── CollationElementIterator.java │ │ │ ├── DateFormatSymbols.java │ │ │ ├── DecimalFormat.java │ │ │ ├── DecimalFormatSymbols.java │ │ │ ├── MessageFormat.java │ │ │ └── SimpleDateFormat.java │ │ └── util │ │ │ ├── AbstractCollection.java │ │ │ ├── AbstractMap.java │ │ │ ├── ArrayList.java │ │ │ ├── Arrays.java │ │ │ ├── BitSet.java │ │ │ ├── Calendar.java │ │ │ ├── Collections.java │ │ │ ├── Currency.java │ │ │ ├── Date.java │ │ │ ├── GregorianCalendar.java │ │ │ ├── HashMap.java │ │ │ ├── HashSet.java │ │ │ ├── Hashtable.java │ │ │ ├── IdentityHashMap.java │ │ │ ├── LinkedHashMap.java │ │ │ ├── LinkedHashSet.java │ │ │ ├── Locale.java │ │ │ ├── Properties.java │ │ │ ├── ResourceBundle.java │ │ │ ├── Stack.java │ │ │ ├── Timer.java │ │ │ ├── Vector.java │ │ │ ├── WeakHashMap.java │ │ │ ├── logging │ │ │ ├── Level.java │ │ │ ├── LogManager.java │ │ │ ├── Logger.java │ │ │ ├── MemoryHandler.java │ │ │ └── StreamHandler.java │ │ │ ├── prefs │ │ │ └── AbstractPreferences.java │ │ │ ├── regex │ │ │ ├── Matcher.java │ │ │ └── Pattern.java │ │ │ └── zip │ │ │ ├── InflaterHuffmanTree.java │ │ │ ├── ZipEntry.java │ │ │ └── ZipFile.java │ ├── javax │ │ ├── print │ │ │ ├── PrintServiceLookup.java │ │ │ ├── StreamPrintServiceFactory.java │ │ │ └── attribute │ │ │ │ └── standard │ │ │ │ └── MediaSize.java │ │ ├── sound │ │ │ ├── midi │ │ │ │ ├── MidiMessage.java │ │ │ │ ├── MidiSystem.java │ │ │ │ └── SysexMessage.java │ │ │ └── sampled │ │ │ │ ├── AudioSystem.java │ │ │ │ ├── CompoundControl.java │ │ │ │ ├── EnumControl.java │ │ │ │ ├── Line.java │ │ │ │ └── spi │ │ │ │ └── FormatConversionProvider.java │ │ └── swing │ │ │ ├── JFileChooser.java │ │ │ ├── JOptionPane.java │ │ │ ├── KeyStroke.java │ │ │ ├── Timer.java │ │ │ ├── UIManager.java │ │ │ ├── colorchooser │ │ │ └── DefaultHSBChooserPanel.java │ │ │ ├── filechooser │ │ │ └── FileSystemView.java │ │ │ ├── plaf │ │ │ ├── basic │ │ │ │ ├── BasicComboBoxUI.java │ │ │ │ ├── BasicInternalFrameUI.java │ │ │ │ ├── BasicLabelUI.java │ │ │ │ ├── BasicToolBarUI.java │ │ │ │ └── BasicTreeUI.java │ │ │ └── metal │ │ │ │ ├── DefaultMetalTheme.java │ │ │ │ ├── MetalLookAndFeel.java │ │ │ │ └── MetalSliderUI.java │ │ │ ├── text │ │ │ ├── FieldView.java │ │ │ ├── ParagraphView.java │ │ │ ├── StyleConstants.java │ │ │ └── html │ │ │ │ ├── FormView.java │ │ │ │ └── HTMLEditorKit.java │ │ │ └── tree │ │ │ ├── FixedHeightLayoutCache.java │ │ │ └── VariableHeightLayoutCache.java │ ├── native │ │ └── jni │ │ │ ├── classpath │ │ │ └── jcl.c │ │ │ └── gtk-peer │ │ │ └── classpath-0_93-jni-gtk-peer.diff │ └── resource │ │ └── gnu │ │ ├── classpath │ │ └── tools │ │ │ ├── common │ │ │ └── messages.properties │ │ │ └── getopt │ │ │ └── messages.properties │ │ ├── java │ │ └── locale │ │ │ ├── LocaleInformation.properties │ │ │ └── LocaleInformation_en.properties │ │ └── javax │ │ └── print │ │ └── MessagesBundle.properties ├── clsp_ldr │ └── java │ │ ├── lang │ │ ├── ClassLoader.java │ │ └── SecurityManager.java │ │ └── security │ │ └── ProtectionDomain.java ├── clsp_pgk │ └── gnu │ │ └── classpath │ │ └── ConfigAwtPeer.java ├── clsp_pqt │ └── gnu │ │ └── classpath │ │ └── ConfigAwtPeer.java ├── clsp_res │ ├── gnu │ │ ├── classpath │ │ │ ├── ConfigAwtPeer.java │ │ │ └── Configuration.java │ │ └── java │ │ │ ├── locale │ │ │ └── LocaleData.java │ │ │ └── security │ │ │ └── Configuration.java │ └── jreslist.in ├── fpvm │ └── java │ │ └── lang │ │ └── VMMath.java ├── noopmain │ └── DummyAppMainClass.java ├── vm │ ├── gnu │ │ ├── classpath │ │ │ ├── CustomProperties.java │ │ │ ├── VMAccessorGnuClasspath.java │ │ │ ├── VMStackWalker.java │ │ │ ├── VMSystemProperties.java │ │ │ ├── VMVendorInfo.java │ │ │ └── jdwp │ │ │ │ ├── VMFrame.java │ │ │ │ ├── VMIdManager.java │ │ │ │ ├── VMMethod.java │ │ │ │ └── VMVirtualMachine.java │ │ └── java │ │ │ ├── lang │ │ │ ├── VMAccessorGnuJavaLang.java │ │ │ ├── VMInstrumentationImpl.java │ │ │ └── management │ │ │ │ ├── VMClassLoadingMXBeanImpl.java │ │ │ │ ├── VMCompilationMXBeanImpl.java │ │ │ │ ├── VMGarbageCollectorMXBeanImpl.java │ │ │ │ ├── VMMemoryMXBeanImpl.java │ │ │ │ ├── VMMemoryManagerMXBeanImpl.java │ │ │ │ ├── VMMemoryPoolMXBeanImpl.java │ │ │ │ ├── VMOperatingSystemMXBeanImpl.java │ │ │ │ ├── VMRuntimeMXBeanImpl.java │ │ │ │ └── VMThreadMXBeanImpl.java │ │ │ ├── net │ │ │ ├── VMAccessorGnuJavaNet.java │ │ │ └── VMPlainSocketImpl.java │ │ │ └── nio │ │ │ ├── EpollSelectorImpl.java │ │ │ ├── KqueueSelectorImpl.java │ │ │ ├── VMAccessorGnuJavaNio.java │ │ │ ├── VMChannel.java │ │ │ ├── VMPipe.java │ │ │ ├── VMSelector.java │ │ │ └── charset │ │ │ └── iconv │ │ │ ├── IconvDecoder.java │ │ │ └── IconvEncoder.java │ ├── java │ │ ├── io │ │ │ ├── VMAccessorJavaIo.java │ │ │ ├── VMFile.java │ │ │ ├── VMObjectInputStream.java │ │ │ └── VMObjectStreamClass.java │ │ ├── lang │ │ │ ├── Class.java │ │ │ ├── Object.java │ │ │ ├── VMAccessorJavaLang.java │ │ │ ├── VMClass.java │ │ │ ├── VMClassLoader.java │ │ │ ├── VMCompiler.java │ │ │ ├── VMDouble.java │ │ │ ├── VMFloat.java │ │ │ ├── VMMath.java │ │ │ ├── VMObject.java │ │ │ ├── VMProcess.java │ │ │ ├── VMRuntime.java │ │ │ ├── VMString.java │ │ │ ├── VMSystem.java │ │ │ ├── VMThread.java │ │ │ ├── VMThrowable.java │ │ │ ├── management │ │ │ │ └── VMManagementFactory.java │ │ │ ├── ref │ │ │ │ ├── Reference.java │ │ │ │ ├── ReferenceQueue.java │ │ │ │ └── VMReference.java │ │ │ └── reflect │ │ │ │ ├── Constructor.java │ │ │ │ ├── Field.java │ │ │ │ ├── Method.java │ │ │ │ ├── VMAccessorJavaLangReflect.java │ │ │ │ ├── VMArray.java │ │ │ │ ├── VMConstructor.java │ │ │ │ ├── VMField.java │ │ │ │ ├── VMMethod.java │ │ │ │ └── VMProxy.java │ │ ├── net │ │ │ ├── VMInetAddress.java │ │ │ ├── VMNetworkInterface.java │ │ │ └── VMURLConnection.java │ │ ├── nio │ │ │ ├── MappedByteBufferImpl.java │ │ │ ├── VMDirectByteBuffer.java │ │ │ └── channels │ │ │ │ └── VMChannels.java │ │ ├── security │ │ │ ├── VMAccessController.java │ │ │ └── VMSecureRandom.java │ │ └── util │ │ │ └── VMTimeZone.java │ └── sun │ │ ├── misc │ │ └── Unsafe.java │ │ └── reflect │ │ ├── Reflection.java │ │ └── misc │ │ └── ReflectUtil.java └── vm_str │ └── java │ └── lang │ ├── String.java │ ├── StringBuffer.java │ └── StringBuilder.java ├── include ├── boehmgc │ ├── gc.h │ ├── gc_confi.h │ ├── gc_gcj.h │ ├── gc_pthre.h │ ├── gc_versi.h │ └── javaxfc.h ├── jcgoaop.c ├── jcgoarth.c ├── jcgobase.c ├── jcgobchk.h ├── jcgochke.h ├── jcgocldr.c ├── jcgocmpl.c ├── jcgodbuf.c ├── jcgofp.c ├── jcgofp.h ├── jcgogli.c ├── jcgogmc.c ├── jcgogmg.c ├── jcgogml.c ├── jcgogmm.c ├── jcgogmn.c ├── jcgogmp.c ├── jcgogmr.c ├── jcgogms.c ├── jcgogmt.c ├── jcgojni.h ├── jcgojnia.c ├── jcgojnie.c ├── jcgojnif.c ├── jcgojnir.c ├── jcgojniv.c ├── jcgojnmd.h ├── jcgomath.c ├── jcgomath.h ├── jcgomem.c ├── jcgomem.h ├── jcgoobjs.c ├── jcgorarr.c ├── jcgorctr.c ├── jcgorefs.c ├── jcgorfld.c ├── jcgormet.c ├── jcgortl.c ├── jcgortl.h ├── jcgostkw.c ├── jcgosyst.c ├── jcgothrd.c ├── jcgothrd.h ├── jcgothrw.c ├── jcgounsf.c ├── jcgoutf.c ├── jcgovcls.c ├── jcgovdbl.c ├── jcgover.h ├── jcgovflt.c ├── jcgovobj.c ├── jcgovrtm.c ├── jcgovstr.c ├── jcgovthr.c ├── jcgoxcpt.c └── tinygc │ ├── gc.h │ ├── gc_gcj.h │ ├── gc_mark.h │ └── javaxfc.h ├── jnidload └── jnidload.c ├── jtrsrc ├── com │ └── ivmaisoft │ │ └── jcgo │ │ ├── AccModifier.java │ │ ├── AnonymousArray.java │ │ ├── Argument.java │ │ ├── ArrElementInit.java │ │ ├── ArrayAccess.java │ │ ├── ArrayCreation.java │ │ ├── ArrayInitializer.java │ │ ├── ArrayLiteral.java │ │ ├── AssertException.java │ │ ├── AssertionStatement.java │ │ ├── Assignment.java │ │ ├── BinaryOp.java │ │ ├── Block.java │ │ ├── BranchContext.java │ │ ├── BreakStatement.java │ │ ├── BreakableStmt.java │ │ ├── CFormattedStream.java │ │ ├── CaseStatement.java │ │ ├── CastExpression.java │ │ ├── CatchSeq.java │ │ ├── CatchStatement.java │ │ ├── CharacterLiteral.java │ │ ├── ClassDeclaration.java │ │ ├── ClassDefinition.java │ │ ├── ClassDefnWithDims.java │ │ ├── ClassDictionary.java │ │ ├── ClassLiteral.java │ │ ├── ClassOrIfaceType.java │ │ ├── CompilationUnit.java │ │ ├── CondExpression.java │ │ ├── CondOrAndOperation.java │ │ ├── ConstValue.java │ │ ├── ConstrDeclaration.java │ │ ├── ConstructorBlock.java │ │ ├── ConstructorCall.java │ │ ├── Context.java │ │ ├── ContinueStatement.java │ │ ├── DimExpr.java │ │ ├── DimSpec.java │ │ ├── DimsList.java │ │ ├── DoStatement.java │ │ ├── Empty.java │ │ ├── ErrorStream.java │ │ ├── ExactClassType.java │ │ ├── ExprStatement.java │ │ ├── Expression.java │ │ ├── ExpressionList.java │ │ ├── ExpressionType.java │ │ ├── FieldDeclaration.java │ │ ├── FileAppendOutput.java │ │ ├── FloatLiteral.java │ │ ├── ForStatement.java │ │ ├── FormalParamList.java │ │ ├── FormalParameter.java │ │ ├── IfThenElse.java │ │ ├── IfaceDeclaration.java │ │ ├── ImportDeclaration.java │ │ ├── InitializerPart.java │ │ ├── InstanceCreation.java │ │ ├── InstanceOf.java │ │ ├── IntLiteral.java │ │ ├── JavaSrcFiles.java │ │ ├── LabeledStatement.java │ │ ├── LeftBrace.java │ │ ├── LexNode.java │ │ ├── LexTerm.java │ │ ├── LiteralStr.java │ │ ├── LocalVariableDecl.java │ │ ├── Main.java │ │ ├── MethodDeclaration.java │ │ ├── MethodDefinition.java │ │ ├── MethodInvocation.java │ │ ├── MethodProxy.java │ │ ├── MethodSignature.java │ │ ├── MethodTraceInfo.java │ │ ├── NameMapper.java │ │ ├── Names.java │ │ ├── ObjHashSet.java │ │ ├── ObjHashtable.java │ │ ├── ObjQueue.java │ │ ├── ObjVector.java │ │ ├── OrderedMap.java │ │ ├── OutputContext.java │ │ ├── PackageDeclaration.java │ │ ├── ParameterList.java │ │ ├── ParenExpression.java │ │ ├── Parser.java │ │ ├── PostfixOp.java │ │ ├── PrefixOp.java │ │ ├── PrimaryFieldAccess.java │ │ ├── PrimitiveType.java │ │ ├── QualifiedName.java │ │ ├── RelationalOp.java │ │ ├── ReturnStatement.java │ │ ├── RightBrace.java │ │ ├── Scanner.java │ │ ├── SecHashAlg.java │ │ ├── Seq.java │ │ ├── SortedStrMap.java │ │ ├── StaticInitializer.java │ │ ├── StringLiteral.java │ │ ├── Super.java │ │ ├── SwitchStatement.java │ │ ├── SynchroMethod.java │ │ ├── SynchroStatement.java │ │ ├── Term.java │ │ ├── This.java │ │ ├── ThrowStatement.java │ │ ├── Token.java │ │ ├── TranslateException.java │ │ ├── TryStatement.java │ │ ├── Type.java │ │ ├── TypeDeclaration.java │ │ ├── TypeWithDims.java │ │ ├── UnaryExpression.java │ │ ├── VarInitializers.java │ │ ├── VariableDeclarator.java │ │ ├── VariableDeclareList.java │ │ ├── VariableDefinition.java │ │ ├── VariableIdentifier.java │ │ ├── VerInfo.java │ │ └── WhileStatement.java ├── jcgo-jcoco.diff └── jcgo.atg ├── minihdr ├── common │ ├── dirent.h │ ├── float.h │ ├── limits.h │ ├── locale.h │ ├── malloc.h │ ├── math.h │ ├── setjmp.h │ ├── stdarg.h │ ├── stddef.h │ ├── stdint.h │ ├── stdio.h │ ├── string.h │ ├── sys │ │ ├── timeb.h │ │ └── utime.h │ └── utime.h ├── dos │ ├── dir.h │ ├── direct.h │ ├── dos.h │ ├── errno.h │ ├── fcntl.h │ ├── io.h │ ├── process.h │ ├── signal.h │ ├── stdlib.h │ ├── sys │ │ ├── locking.h │ │ ├── stat.h │ │ └── types.h │ └── time.h ├── unix │ ├── errno.h │ ├── fcntl.h │ ├── ieeefp.h │ ├── netdb.h │ ├── netinet │ │ ├── in.h │ │ └── tcp.h │ ├── pwd.h │ ├── signal.h │ ├── stdlib.h │ ├── sys │ │ ├── ioctl.h │ │ ├── select.h │ │ ├── socket.h │ │ ├── stat.h │ │ ├── time.h │ │ ├── types.h │ │ ├── utsname.h │ │ └── wait.h │ ├── time.h │ └── unistd.h └── win │ ├── mmsystem.h │ ├── winbase.h │ ├── windef.h │ ├── windows.h │ ├── winerror.h │ ├── winnls.h │ ├── winnt.h │ ├── winsock.h │ ├── winsock2.h │ └── ws2tcpip.h ├── miscsrc ├── jawtstub │ └── jawt.c ├── jpropjav │ └── com │ │ └── ivmaisoft │ │ └── jpropjav │ │ ├── Main.java │ │ └── StrListResourceBundle.java ├── tpthread │ ├── pthread.h │ ├── sched.h │ └── tpthread.c └── winmain │ └── winmain.c ├── mkjcgo ├── build-java.sh ├── build-linux-amd64.sh ├── build-linux-x86.sh ├── build-win32-mingw.sh ├── build-win32-msvc.bat ├── build-win64-mingw32.sh ├── build-win64-msvc.bat ├── test-java.sh └── test-miscsrc-cygwin.sh ├── native ├── jcgodns.c ├── jcgodns.h ├── jcgoexec.c ├── jcgoexec.h ├── jcgofile.c ├── jcgofile.h ├── jcgojnu.c ├── jcgojnu.h ├── jcgonet.c ├── jcgonet.h ├── jcgoprop.c └── jcgoprop.h ├── reflgen ├── com │ └── ivmaisoft │ │ └── jcgorefl │ │ ├── GenRefl.java │ │ └── TraceJni.java ├── gnucpawt.dat ├── gnucpmsc.dat ├── gnucpsnd.dat ├── gnucpxml.dat ├── jdkexcl.dat ├── jna.dat ├── jrepatch │ ├── apache-harmony-5_0M8.diff │ ├── classpath-0_93.diff │ ├── j2sdk1_4_2_19.diff │ └── jdk-7-ea-src.diff ├── rxtx.dat ├── sqlite.dat ├── swt.dat └── trjnic.c ├── stdpaths.in └── sunawt ├── J2SDK_LICENSE.txt ├── SCSL_SourceLicense.txt ├── awtSampl ├── csrc ├── awtrescl.in ├── dist_lnx.lst ├── dist_rtj.lst ├── dist_sol.lst ├── dist_win.lst ├── javadll │ ├── jio.c │ ├── jni_util.c │ ├── linux │ │ └── mapfile-vers │ ├── util.c │ └── win32 │ │ └── java_props_md.c ├── jre14awt.dat ├── jre14snd.dat ├── jvmdll │ ├── jvm_os.c │ ├── jvm_unix.c │ ├── jvm_win.c │ └── linux │ │ └── mapfile-vers-product ├── services │ ├── javax.print.PrintServiceLookup │ └── javax.sound.sampled.spi.MixerProvider └── suncomm.dat ├── fix ├── com │ └── sun │ │ └── java │ │ └── swing │ │ └── plaf │ │ ├── gtk │ │ ├── GTKIconFactory.java │ │ └── GTKStyle.java │ │ ├── motif │ │ ├── MotifInternalFrameTitlePane.java │ │ └── MotifTreeCellRenderer.java │ │ └── windows │ │ └── WindowsFileChooserUI.java ├── java │ ├── applet │ │ └── Applet.java │ └── awt │ │ ├── EventDispatchThread.java │ │ └── Window.java ├── javax │ ├── accessibility │ │ ├── AccessibleBundle.java │ │ ├── AccessibleContext.java │ │ ├── AccessibleRelation.java │ │ ├── AccessibleRelationSet.java │ │ ├── AccessibleRole.java │ │ ├── AccessibleState.java │ │ └── AccessibleStateSet.java │ ├── imageio │ │ └── ImageIO.java │ ├── print │ │ └── StreamPrintServiceFactory.java │ └── swing │ │ ├── JApplet.java │ │ ├── JDialog.java │ │ ├── JFrame.java │ │ ├── JInternalFrame.java │ │ ├── JWindow.java │ │ ├── ToolTipManager.java │ │ ├── colorchooser │ │ └── DefaultSwatchChooserPanel.java │ │ ├── filechooser │ │ └── FileSystemView.java │ │ ├── plaf │ │ ├── basic │ │ │ ├── BasicProgressBarUI.java │ │ │ ├── BasicSpinnerUI.java │ │ │ └── BasicTextUI.java │ │ └── multi │ │ │ └── MultiLookAndFeel.java │ │ └── text │ │ └── html │ │ └── FrameSetView.java └── sun │ ├── applet │ ├── AppletAudioClip.java │ ├── AppletClassLoader.java │ ├── AppletPanel.java │ ├── AppletSecurity.java │ ├── AppletViewer.java │ ├── AppletViewerPanel.java │ └── Main.java │ ├── awt │ ├── AppContext.java │ ├── DebugHelper.java │ ├── EmbeddedFrame.java │ ├── SunToolkit.java │ ├── datatransfer │ │ ├── DataTransferer.java │ │ └── TransferableProxy.java │ ├── dnd │ │ └── SunDropTargetContextPeer.java │ ├── font │ │ ├── AdvanceCache.java │ │ └── NativeFontWrapper.java │ ├── im │ │ ├── CompositionArea.java │ │ └── InputMethodContext.java │ ├── image │ │ ├── BufImgSurfaceData.java │ │ ├── GifImageDecoder.java │ │ ├── ImageRepresentation.java │ │ └── URLImageSource.java │ └── shell │ │ └── ShellFolder.java │ ├── dc │ └── pr │ │ └── Rasterizer.java │ ├── java2d │ ├── Disposer.java │ ├── NullSurfaceData.java │ ├── SunGraphics2D.java │ ├── SunGraphicsEnvironment.java │ ├── SurfaceData.java │ ├── loops │ │ ├── GraphicsPrimitive.java │ │ └── SurfaceType.java │ └── pipe │ │ ├── DrawImage.java │ │ └── DuctusRenderer.java │ ├── net │ └── www │ │ └── ParseUtil.java │ ├── print │ ├── PSPathGraphics.java │ ├── PSPrinterJob.java │ ├── PrintJob2D.java │ ├── RasterPrinterJob.java │ └── ServiceDialog.java │ └── reflect │ └── misc │ ├── ConstructorUtil.java │ ├── FieldUtil.java │ └── MethodUtil.java ├── fix_snd ├── com │ └── sun │ │ └── media │ │ └── sound │ │ ├── AbstractMidiDeviceProvider.java │ │ ├── CircularBuffer.java │ │ ├── DefaultServices.java │ │ ├── DirectAudioDevice.java │ │ ├── DirectAudioDeviceProvider.java │ │ ├── EventDispatcher.java │ │ ├── HeadspaceMixerProvider.java │ │ ├── JDK13Services.java │ │ ├── JSSecurityManager.java │ │ ├── MidiInDeviceProvider.java │ │ ├── MidiOutDeviceProvider.java │ │ ├── MixerSequencer.java │ │ ├── MixerSourceLine.java │ │ ├── MixerThread.java │ │ ├── Platform.java │ │ ├── SimpleInputDevice.java │ │ ├── SimpleOutputDevice.java │ │ ├── SimpleOutputDeviceProvider.java │ │ └── StandardMidiFileReader.java └── javax │ └── sound │ ├── midi │ ├── MetaMessage.java │ ├── MidiSystem.java │ ├── Sequence.java │ ├── ShortMessage.java │ └── Track.java │ └── sampled │ ├── AudioFileFormat.java │ ├── AudioFormat.java │ ├── AudioInputStream.java │ ├── AudioSystem.java │ ├── BooleanControl.java │ ├── DataLine.java │ ├── FloatControl.java │ ├── LineEvent.java │ └── Port.java ├── fix_sql ├── java │ └── sql │ │ ├── DriverManager.java │ │ └── SQLException.java └── sun │ └── jdbc │ └── odbc │ ├── JdbcOdbc.java │ ├── JdbcOdbcCallableStatement.java │ ├── JdbcOdbcObject.java │ └── JdbcOdbcPreparedStatement.java ├── fix_win ├── java │ └── awt │ │ ├── GraphicsEnvironment.java │ │ ├── Toolkit.java │ │ └── print │ │ └── PrinterJob.java ├── javax │ ├── print │ │ └── PrintServiceLookup.java │ └── swing │ │ └── UIManager.java └── sun │ ├── awt │ ├── Win32GraphicsDevice.java │ ├── shell │ │ ├── Win32ShellFolder.java │ │ ├── Win32ShellFolder2.java │ │ └── Win32ShellFolderManager2.java │ └── windows │ │ ├── WCanvasPeer.java │ │ ├── WComponentPeer.java │ │ ├── WDialogPeer.java │ │ ├── WEmbeddedFrame.java │ │ ├── WEmbeddedFramePeer.java │ │ ├── WFontPeer.java │ │ ├── WFramePeer.java │ │ ├── WInputMethod.java │ │ ├── WListPeer.java │ │ ├── WObjectPeer.java │ │ ├── WPanelPeer.java │ │ ├── WPathGraphics.java │ │ ├── WPrinterJob.java │ │ ├── WToolkit.java │ │ ├── WVolatileImage.java │ │ ├── WWindowPeer.java │ │ ├── Win32OffScreenSurfaceData.java │ │ └── Win32SurfaceData.java │ └── print │ ├── Win32PrintService.java │ └── Win32PrintServiceLookup.java ├── fix_x11 ├── com │ └── sun │ │ └── java │ │ └── swing │ │ └── plaf │ │ └── windows │ │ ├── WindowsLookAndFeel.java │ │ └── XPStyle.java ├── java │ └── awt │ │ ├── GraphicsEnvironment.java │ │ └── print │ │ └── PrinterJob.java ├── javax │ ├── print │ │ └── PrintServiceLookup.java │ └── swing │ │ └── UIManager.java └── sun │ ├── awt │ ├── X11PMBlitBgLoops.java │ ├── X11PMBlitLoops.java │ ├── X11SurfaceData.java │ ├── image │ │ ├── DataBufferNative.java │ │ └── WritableRasterNative.java │ ├── motif │ │ ├── MChoicePeer.java │ │ ├── MDialogPeer.java │ │ ├── MDragSourceContextPeer.java │ │ ├── MDropTargetContextPeer.java │ │ ├── MEmbeddedFramePeer.java │ │ ├── MFontPeer.java │ │ ├── MFontProperties.java │ │ ├── MFramePeer.java │ │ ├── MWindowPeer.java │ │ ├── X11InputMethod.java │ │ └── X11RemoteOffScreenImage.java │ └── print │ │ └── AwtPrintControl.java │ └── print │ └── UnixPrintServiceLookup.java ├── mklibs ├── build-java.sh └── test-java.sh ├── stdp_win.in └── stdp_x11.in /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Git repo attributes. 2 | 3 | # Ensure all text files have normalized (LF) line endings in the repository. 4 | * text=auto 5 | 6 | # Note: "core.eol" configuration variable controls which line endings to use 7 | # for the normalized files in the working directory (the default is native). 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files to be ignored by Git. 2 | 3 | *.class 4 | 5 | /core 6 | /jcgo 7 | /jcgo-* 8 | /jcgo.exe 9 | /jcgo.jar 10 | 11 | /.build_tmp/ 12 | /auxbin/ 13 | /bin/ 14 | /dlls/ 15 | /libs/ 16 | /rflg_out/ 17 | /sawt_out/ 18 | 19 | /classpath-0.93 20 | 21 | /*.tar 22 | /*.tar.bz2 23 | /*.tar.gz 24 | 25 | /.checkstyle 26 | /.codepro/ 27 | /.project 28 | /.settings/ 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The software in this package is distributed under the GNU General Public 2 | License (with a special exception described below). 3 | 4 | A copy of GNU General Public License (GPL) is included in this distribution, 5 | in the file COPYING. 6 | 7 | As a special exception, the copyright holders of this package give you 8 | permission to link this code with independent modules to produce an 9 | executable, regardless of the license terms of these independent 10 | modules, and to copy and distribute the resulting executable under 11 | terms of your choice, provided that you also meet, for each linked 12 | independent module, the terms and conditions of the license of that 13 | module. An independent module is a module which is not derived from 14 | or based on this code. If you modify this code, you may extend 15 | this exception to your version of the code, but you are not 16 | obligated to do so. If you do not wish to do so, delete this 17 | exception statement from your version. 18 | 19 | This software may also contain other code (examples, external libraries and 20 | the optional AWT subsystem) distributed under other terms. 21 | -------------------------------------------------------------------------------- /README_QUICK.txt: -------------------------------------------------------------------------------- 1 | 2 | JCGO quick start tips (Win32) 3 | ----------------------------- 4 | 5 | 1. Download the core prerequisites: 6 | jcgo-src-1_XX.tar.bz2 7 | jcgo-lib-1_XX.tar.gz 8 | ftp://ftp.gnu.org/gnu/classpath/classpath-0.93.tar.gz 9 | 10 | 2. Create "C:\JCGO" folder. 11 | 12 | 3. Unpack all the prerequisites to C:\JCGO (preserving the directory 13 | structure). 14 | 15 | 4. Try to convert "Hello world" sample to Windows binary (unoptimized): 16 | 17 | - create your "projects" folders (e.g., "C:\MyJcgoProjects") and change 18 | the current directory to it; 19 | 20 | - type: 21 | 22 | C:\JCGO\jcgo.exe -sourcepath $~\examples\simple Hello @$~\stdpaths.in 23 | 24 | or, alternatively: 25 | 26 | java -jar C:\JCGO\jcgo.jar -sourcepath $~\examples\simple Hello @$~\stdpaths.in 27 | 28 | - invoke the MinGW C compiler (GCC): 29 | 30 | gcc -IC:\JCGO\include -IC:\JCGO\include\boehmgc -IC:\JCGO\native -DJCGO_FFDATA -o hello jcgo_Out\Main.c C:\JCGO\libs\x86\mingw\libgc.a 31 | 32 | - or invoke Visual Studio C/C++ compiler: 33 | 34 | cl -IC:\JCGO\include -IC:\JCGO\include\boehmgc -IC:\JCGO\native -DJCGO_INTNN -DJCGO_FFDATA -DJCGO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE jcgo_Out\Main.c C:\JCGO\libs\x86\msvc\gc.lib /link /out:hello.exe 35 | 36 | - run "hello.exe" file. 37 | 38 | 5. View "README" file. 39 | 40 | 41 | JCGO quick start tips for Linux/x86 development host 42 | ---------------------------------------------------- 43 | 44 | 1. Download the core prerequisites (mentioned above). 45 | 46 | 2. Create "/usr/share/JCGO" folder. 47 | 48 | 3. Unpack all the prerequisites to /usr/share/JCGO (preserving the 49 | directory structure). 50 | 51 | 4. Try to convert "Hello world" sample to a Linux/x86 binary (unoptimized): 52 | 53 | - create your "projects" folders (e.g., "~/MyJcgoProjects") and change 54 | the current directory to it; 55 | 56 | - type: 57 | 58 | /usr/share/JCGO/jcgo -src $~/examples/simple Hello @$~/stdpaths.in 59 | 60 | or, alternatively: 61 | 62 | java -jar /usr/share/JCGO/jcgo.jar -src $~/examples/simple Hello @$~/stdpaths.in 63 | 64 | - invoke the GNU GCC: 65 | 66 | gcc -I /usr/share/JCGO/include -I /usr/share/JCGO/include/boehmgc -I /usr/share/JCGO/native -fwrapv -DJCGO_UNIX -D_IEEEFP_H -DJCGO_UNIFSYS -o hello jcgo_Out/Main.c -lm /usr/share/JCGO/libs/x86/linux/libgc.a 67 | 68 | - run "hello" file. 69 | 70 | --- [ End of File ] --- 71 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | TODO tasks 2 | ========== 3 | -------------------------------------------------------------------------------- /contrib/.gitignore: -------------------------------------------------------------------------------- 1 | # Placeholder to keep folder in Git. 2 | 3 | * 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /examples/CaffeineMarkEmbedded-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN orig_decompiled/BenchmarkUnit.java modified/BenchmarkUnit.java 2 | --- orig_decompiled/BenchmarkUnit.java 2009-07-04 20:43:08.000000000 +0400 3 | +++ modified/BenchmarkUnit.java 2009-07-04 21:13:12.000000000 +0400 4 | @@ -16,13 +16,13 @@ 5 | 6 | void calibrate() 7 | { 8 | - int i = loopsPerSecond(); 9 | + long i = loopsPerSecond(); 10 | if(i == 0) 11 | return; 12 | int j = testMilliseconds(i); 13 | if(j != 0) 14 | { 15 | - magnification = (100 * j) / (3 * i); 16 | + magnification = (int)((100 * j) / (3 * i)); 17 | return; 18 | } else 19 | { 20 | @@ -31,9 +31,9 @@ 21 | } 22 | } 23 | 24 | - int loopsPerSecond() 25 | + long loopsPerSecond() 26 | { 27 | - int i = 0; 28 | + long i = 0; 29 | StopWatch stopwatch = new StopWatch(); 30 | if(!unitAtom.initialize(0)) 31 | return 0; 32 | @@ -58,14 +58,14 @@ 33 | unitAtom.setLocal(); 34 | } 35 | 36 | - int testMilliseconds(int i) 37 | + int testMilliseconds(long i) 38 | { 39 | int j = 0; 40 | if(!unitAtom.initialize(0)) 41 | return 0; 42 | StopWatch stopwatch = new StopWatch(); 43 | stopwatch.StartTimer(); 44 | - int k = 3 * i; 45 | + long k = 3 * i; 46 | j = 0; 47 | while(k > 0) 48 | { 49 | @@ -85,7 +85,7 @@ 50 | 51 | int testScore() 52 | { 53 | - int i = loopsPerSecond(); 54 | + long i = loopsPerSecond(); 55 | if(i == 0) 56 | { 57 | lastScore = 0; 58 | @@ -93,7 +93,7 @@ 59 | } 60 | int j = testMilliseconds(i); 61 | if(j != 0) 62 | - j = (magnification * (3 * i)) / j; 63 | + j = (int)(magnification * (3 * i) / j); 64 | lastScore = j; 65 | return j; 66 | } 67 | -------------------------------------------------------------------------------- /examples/d3caster-1_1_0-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN original/d3caster/gamelocal.html modified/d3caster/gamelocal.html 2 | --- original/d3caster/gamelocal.html 2004-10-25 18:49:22.000000000 +0400 3 | +++ modified/d3caster/gamelocal.html 2009-07-17 15:15:04.000000000 +0400 4 | @@ -5,21 +5,22 @@ 5 | 19 | 20 | 29 | - 30 | + 31 | 32 | 33 | 34 | diff -ruN original/d3caster/stahlforce/d3caster.java modified/d3caster/stahlforce/d3caster.java 35 | --- original/d3caster/stahlforce/d3caster.java 2004-11-14 20:40:28.000000000 +0400 36 | +++ modified/d3caster/stahlforce/d3caster.java 2009-07-10 16:53:58.000000000 +0400 37 | @@ -2547,7 +2547,11 @@ 38 | } 39 | 40 | void cleanup() { 41 | - closeSound(); 42 | +// This is commented out to prevent InterruptedException thrown 43 | +// inside JDK JSound MixerClip.nClose() (and to prevent checked 44 | +// JNI warning "JNI call made with exception pending") when the 45 | +// applet "Close" menu item is selected. 46 | + /* closeSound(); */ 47 | } 48 | 49 | // ============= walking bot support ===================== 50 | -------------------------------------------------------------------------------- /examples/jdk13_JavaSound-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN original/CapturePlayback.java modified/CapturePlayback.java 2 | --- original/CapturePlayback.java 2007-01-18 13:15:04.000000000 +0400 3 | +++ modified/CapturePlayback.java 2009-07-12 00:19:56.000000000 +0400 4 | @@ -138,6 +138,7 @@ 5 | samplingGraph.start(); 6 | captB.setEnabled(false); 7 | pausB.setEnabled(true); 8 | + pausB.setText("Pause"); 9 | playB.setText("Stop"); 10 | } else { 11 | playback.stop(); 12 | @@ -158,6 +159,7 @@ 13 | auB.setEnabled(false); 14 | aiffB.setEnabled(false); 15 | waveB.setEnabled(false); 16 | + pausB.setText("Pause"); 17 | captB.setText("Stop"); 18 | } else { 19 | lines.removeAllElements(); 20 | @@ -229,7 +231,8 @@ 21 | try { 22 | this.file = file; 23 | errStr = null; 24 | - audioInputStream = AudioSystem.getAudioInputStream(file); 25 | + audioInputStream = AudioSystem.getAudioInputStream( 26 | + new BufferedInputStream(new FileInputStream(file))); 27 | playB.setEnabled(true); 28 | fileName = file.getName(); 29 | long milliseconds = (long)((audioInputStream.getFrameLength() * 1000) / audioInputStream.getFormat().getFrameRate()); 30 | @@ -385,6 +388,7 @@ 31 | } 32 | int numBytesRemaining = numBytesRead; 33 | while (numBytesRemaining > 0 ) { 34 | + if (!line.isOpen()) break; 35 | numBytesRemaining -= line.write(data, 0, numBytesRemaining); 36 | } 37 | } catch (Exception e) { 38 | -------------------------------------------------------------------------------- /examples/jdk142_DrawTest-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN original/DrawTest.java modified/DrawTest.java 2 | --- original/DrawTest.java 2008-11-10 23:31:58.000000000 +0400 3 | +++ modified/DrawTest.java 2009-07-09 17:29:42.000000000 +0400 4 | @@ -62,6 +62,11 @@ 5 | 6 | public static void main(String args[]) { 7 | Frame f = new Frame("DrawTest"); 8 | + 9 | + f.addWindowListener(new WindowAdapter() { 10 | + public void windowClosing(WindowEvent e) { System.exit(0); } 11 | + }); 12 | + 13 | DrawTest drawTest = new DrawTest(); 14 | drawTest.init(); 15 | drawTest.start(); 16 | @@ -194,6 +199,12 @@ 17 | DrawPanel target; 18 | 19 | public DrawControls(DrawPanel target) { 20 | + Button button = new Button("Quit"); 21 | + button.addActionListener(new ActionListener() { 22 | + public void actionPerformed(ActionEvent e) { System.exit(0); } 23 | + }); 24 | + add(button); 25 | + 26 | this.target = target; 27 | setLayout(new FlowLayout()); 28 | setBackground(Color.lightGray); 29 | -------------------------------------------------------------------------------- /examples/jdk142_Java2Demo-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN original/java2d/DemoImages.java modified/java2d/DemoImages.java 2 | --- original/java2d/DemoImages.java 2008-11-10 00:17:46.000000000 +0400 3 | +++ modified/java2d/DemoImages.java 2009-07-11 23:52:16.000000000 +0400 4 | @@ -82,8 +82,8 @@ 5 | } 6 | } 7 | 8 | - URLClassLoader urlLoader = (URLClassLoader)cmp.getClass().getClassLoader(); 9 | - URL fileLoc = urlLoader.findResource("images/" + name); 10 | + ClassLoader urlLoader = (ClassLoader)cmp.getClass().getClassLoader(); 11 | + URL fileLoc = urlLoader.getResource("images/" + name); 12 | img = cmp.getToolkit().createImage(fileLoc); 13 | 14 | MediaTracker tracker = new MediaTracker(cmp); 15 | diff -ruN original/java2d/Intro.java modified/java2d/Intro.java 16 | --- original/java2d/Intro.java 2008-11-10 00:17:46.000000000 +0400 17 | +++ modified/java2d/Intro.java 2009-07-11 23:50:00.000000000 +0400 18 | @@ -1135,6 +1135,7 @@ 19 | 20 | 21 | public void render(int w, int h, Graphics2D g2) { 22 | + if (big == null) return; 23 | big.setColor(black); 24 | 25 | for (int k = 0; k <= (ending - beginning); k++) { 26 | diff -ruN original/java2d/MemoryMonitor.java modified/java2d/MemoryMonitor.java 27 | --- original/java2d/MemoryMonitor.java 2008-11-10 23:32:06.000000000 +0400 28 | +++ modified/java2d/MemoryMonitor.java 2009-07-11 23:50:38.000000000 +0400 29 | @@ -237,6 +237,7 @@ 30 | System.arraycopy(tmp, 0, pts, 0, tmp.length); 31 | } else { 32 | big.setColor(Color.yellow); 33 | + if (pts.length <= ptNum) return; 34 | pts[ptNum] = (int)(graphY+graphH*(freeMemory/totalMemory)); 35 | for (int j=graphX+graphW-ptNum, k=0;k < ptNum; k++, j++) { 36 | if (k != 0) { 37 | diff -ruN original/java2d/Tools.java modified/java2d/Tools.java 38 | --- original/java2d/Tools.java 2008-11-10 23:32:08.000000000 +0400 39 | +++ modified/java2d/Tools.java 2009-07-11 23:51:18.000000000 +0400 40 | @@ -357,6 +357,7 @@ 41 | if (pDialogState) { 42 | printJob.print(aset); 43 | } 44 | + } catch (java.awt.print.PrinterException e) { 45 | } catch (java.security.AccessControlException ace) { 46 | String errmsg = "Applet access control exception; to allow " + 47 | "access to printer, run policytool and set\n" + 48 | -------------------------------------------------------------------------------- /examples/jdk142_SwingSet2-src.diff: -------------------------------------------------------------------------------- 1 | diff -ruN original/BezierAnimationPanel.java modified/BezierAnimationPanel.java 2 | --- original/BezierAnimationPanel.java 2008-11-10 23:32:10.000000000 +0400 3 | +++ modified/BezierAnimationPanel.java 2009-07-12 00:03:06.000000000 +0400 4 | @@ -93,6 +93,8 @@ 5 | 6 | Thread anim; 7 | 8 | + private final Object lock = new Object(); 9 | + 10 | /** 11 | * BezierAnimationPanel Constructor 12 | */ 13 | @@ -280,6 +282,7 @@ 14 | } 15 | gp.closePath(); 16 | 17 | + synchronized (lock) { 18 | g2d.setComposite(set); 19 | g2d.setBackground(backgroundColor); 20 | g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 21 | @@ -311,6 +314,7 @@ 22 | gradientColorB, true); 23 | g2d.setComposite(blend); 24 | g2d.fill(gp); 25 | + } 26 | 27 | if (g2d == BufferG2D) { 28 | repaint(); 29 | @@ -324,8 +328,9 @@ 30 | } 31 | 32 | public void paint(Graphics g) { 33 | - synchronized (this) { 34 | + synchronized (lock) { 35 | Graphics2D g2d = (Graphics2D) g; 36 | + BufferedImage img = this.img; 37 | if (img != null) { 38 | int imgw = img.getWidth(); 39 | int imgh = img.getHeight(); 40 | diff -ruN original/SwingSet2.java modified/SwingSet2.java 41 | --- original/SwingSet2.java 2008-11-10 23:32:10.000000000 +0400 42 | +++ modified/SwingSet2.java 2009-07-12 00:05:14.000000000 +0400 43 | @@ -935,6 +935,7 @@ 44 | public void setLookAndFeel(String laf) { 45 | if(currentLookAndFeel != laf) { 46 | currentLookAndFeel = laf; 47 | + if(themesMenu != null) 48 | themesMenu.setEnabled(laf == metal); 49 | updateLookAndFeel(); 50 | } 51 | -------------------------------------------------------------------------------- /examples/misc_translation_cmds: -------------------------------------------------------------------------------- 1 | 2 | JDK_Java2Demo (Win32): jcgo java2d.Java2Demo @$~\sunawt\stdp_win.in java2d\demos\Arcs_Curves\* java2d\demos\Clipping\* java2d\demos\Colors\* java2d\demos\Composite\* java2d\demos\Fonts\* java2d\demos\Images\* java2d\demos\Lines\* java2d\demos\Mix\* java2d\demos\Paint\* java2d\demos\Paths\* java2d\demos\Transforms\* 3 | 4 | JDK_JavaSound (Win32): jcgo -src $~\sunawt\fix_snd -src src JavaSound @$~\sunawt\stdp_win.in gnu.java.net.protocol.http.Handler 5 | 6 | JDK_SwingSet2 (Win32): jcgo -src $~\sunawt\fix_snd -src src SwingSet2 @$~\sunawt\stdp_win.in gnu.java.net.protocol.jar.Handler 7 | JDK_SwingSet2 (Linux): jcgo -src $~/sunawt/fix_snd -src src SwingSet2 @$~/sunawt/stdp_x11.in gnu.java.net.protocol.jar.Handler com.sun.media.sound.DirectAudioDeviceProvider 8 | JDK_SwingSet2 (Solaris): jcgo -src $~/sunawt/fix_snd -src src SwingSet2 @$~/sunawt/stdp_x11.in gnu.java.net.protocol.jar.Handler 9 | 10 | d3caster (Win32): jcgo -src $~\sunawt\fix_snd sun.applet.Main @$~\sunawt\stdp_win.in stahlforce.d3caster 11 | -------------------------------------------------------------------------------- /examples/simple/DynProxyTest.java: -------------------------------------------------------------------------------- 1 | 2 | import java.lang.reflect.*; 3 | 4 | class DynProxyTest { 5 | public static void main(String args[]) { 6 | Object proxyInstance = Proxy.newProxyInstance (DynProxyTest.class.getClassLoader(), 7 | new Class[] { I1.class, I2.class }, 8 | new IHandler()); 9 | 10 | I1 i1 = (I1)proxyInstance; 11 | System.out.println ("i1.func(\"abc\")"); 12 | System.out.println (i1.func("abc")); 13 | System.out.println (); 14 | 15 | System.out.println ("i1.func1()"); 16 | System.out.println (i1.func1()); 17 | System.out.println (); 18 | 19 | I2 i2 = (I2)proxyInstance; 20 | System.out.println ("i2.func(\"fgh\")"); 21 | System.out.println (i2.func("fgh")); 22 | System.out.println (); 23 | 24 | System.out.println ("i2.func2(123)"); 25 | i2.func2(123); 26 | } 27 | 28 | interface I1 { 29 | public Object func (Object arg); 30 | public int func1 (); 31 | } 32 | 33 | static class IHandler implements InvocationHandler { 34 | 35 | static Method I1_func; 36 | static Method I1_func1; 37 | static Method I2_func2; 38 | 39 | static { 40 | try { 41 | I1_func = I1.class.getDeclaredMethod ("func", new Class[]{Object.class}); 42 | I1_func1 = I1.class.getDeclaredMethod ("func1", new Class[]{}); 43 | I2_func2 = I2.class.getDeclaredMethod ("func2", new Class[]{int.class}); 44 | } catch (Exception exc) { 45 | System.out.println (exc); 46 | System.exit (1); 47 | } 48 | } 49 | 50 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { 51 | 52 | if (method.equals (I1_func)) { 53 | System.out.println (" InvocationHandler invoke: I1.func(" + args[0] + ")"); 54 | return "processed " + args[0]; 55 | } 56 | 57 | if (method.equals (I1_func1)) { 58 | System.out.println (" InvocationHandler invoke: I1 or I2 func1()"); 59 | return new Integer (456); 60 | } 61 | 62 | if (method.equals (I2_func2)) { 63 | System.out.println (" InvocationHandler invoke: I2.func2(" + ((Integer)args[0]).intValue() + ")"); 64 | return null; 65 | } 66 | System.out.println ("Oops! It shouldn't happen!"); 67 | return null; 68 | } 69 | } 70 | 71 | } 72 | 73 | interface I2 { 74 | public Object func (Object arg); 75 | public void func2 (int arg); 76 | } 77 | -------------------------------------------------------------------------------- /examples/simple/Empty1.java: -------------------------------------------------------------------------------- 1 | 2 | public class Empty1 3 | { 4 | 5 | public static void main(String[] args) {} 6 | } 7 | -------------------------------------------------------------------------------- /examples/simple/Empty2.java: -------------------------------------------------------------------------------- 1 | 2 | public class Empty2 3 | { 4 | 5 | public static void main(String[] args) 6 | { 7 | new Empty2(); 8 | "".getClass().getName().charAt(0); 9 | int[] a1 = { 1, 0 }; 10 | int[] a2 = new int[a1.length]; 11 | System.arraycopy(a1, 0, a2, 0, a1.length); 12 | } 13 | 14 | public void finalize() 15 | { 16 | new Object(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/simple/Empty3.java: -------------------------------------------------------------------------------- 1 | 2 | public class Empty3 3 | { 4 | 5 | public static void main(String[] args) 6 | { 7 | if (new Object() == null) 8 | throw new Error(""); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/simple/Empty4.java: -------------------------------------------------------------------------------- 1 | 2 | public class Empty4 3 | { 4 | 5 | public static void main(String[] args) 6 | { 7 | if (args != null) 8 | Thread.currentThread(); 9 | } 10 | 11 | public void finalize() 12 | { 13 | new Object(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/simple/Hello.java: -------------------------------------------------------------------------------- 1 | 2 | public class Hello 3 | { 4 | 5 | public static void main(String[] args) 6 | { 7 | System.out.println("Hello, world!"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/simple/ListDir.java: -------------------------------------------------------------------------------- 1 | import java.io.File; 2 | 3 | public class ListDir 4 | { 5 | public static void main(String args[]) 6 | throws java.io.IOException 7 | { 8 | File dir = new File(args.length > 0 ? args[0] : "."); 9 | String list[] = dir.list(); 10 | if (list != null) 11 | { 12 | for (int i = 0; i < list.length; i++) 13 | { 14 | File f = new File(dir, list[i]); 15 | System.out.println("[" + f.getName() + "] " + 16 | (f.exists() ? "E" : "-") + (f.isFile() ? "F" : "-") + 17 | (f.isDirectory() ? "D" : "-") + (f.isHidden() ? "H" : "-") + 18 | (f.canRead() ? "R" : "-") + (f.canWrite() ? "W" : "-") + " " + 19 | f.length() + " bytes, " + 20 | new java.util.Date(f.lastModified()).toGMTString() + ", " + 21 | f.getCanonicalPath()); 22 | } 23 | } 24 | else System.out.println("<>"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/simple/PhantomUsage.java: -------------------------------------------------------------------------------- 1 | import java.lang.ref.*; 2 | 3 | class PhantomReference2 extends PhantomReference 4 | { 5 | private static int num = 0; 6 | int i = --num; 7 | public PhantomReference2(Object referent, ReferenceQueue q) 8 | { 9 | super(referent, q); 10 | } 11 | protected void finalize() throws Throwable 12 | { 13 | System.out.println("Finalizing reference: " + this); 14 | } 15 | public String toString() { return "Phantom{" + "" +i + "}"; } 16 | } 17 | 18 | class PhantomUsage 19 | { 20 | static class MyObject 21 | { 22 | static int cnt; 23 | int i = ++cnt; 24 | public String toString() { return "[" + "" +i + "]"; } 25 | protected void finalize() throws Throwable 26 | { 27 | System.out.println("Finalizing object: " + this); 28 | } 29 | } 30 | 31 | public static void main(String args[]) 32 | { 33 | Runtime.runFinalizersOnExit(true); 34 | ReferenceQueue rq = new ReferenceQueue(); 35 | Reference refs[] = new Reference[10]; 36 | for (int i=0;i<5;i++) 37 | refs[i] = test(rq); 38 | System.gc(); 39 | System.runFinalization(); 40 | System.out.println("Polling the queue returns " + rq.poll()); 41 | System.out.println("Ok"); 42 | } 43 | 44 | public static Reference test(ReferenceQueue rq) 45 | { 46 | MyObject obj = new MyObject(); 47 | Reference wr = new PhantomReference2(obj, rq); 48 | obj = null; 49 | System.gc(); 50 | System.out.println("Polling the queue returns " + rq.poll()); 51 | return wr; 52 | } 53 | } 54 | 55 | /* approx output: 56 | Polling the queue returns null 57 | Polling the queue returns null 58 | Finalizing object: [1] 59 | Finalizing object: [3] 60 | Polling the queue returns null 61 | Finalizing object: [2] 62 | Polling the queue returns Phantom{-1} 63 | Finalizing object: [4] 64 | Polling the queue returns Phantom{-2} 65 | Finalizing object: [5] 66 | Polling the queue returns Phantom{-4} 67 | Ok 68 | Finalizing reference: Phantom{-5} 69 | Finalizing reference: Phantom{-4} 70 | Finalizing reference: Phantom{-3} 71 | Finalizing reference: Phantom{-2} 72 | Finalizing reference: Phantom{-1} 73 | */ 74 | -------------------------------------------------------------------------------- /examples/simple/QSort.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.*; 3 | 4 | public final class QSort 5 | { 6 | 7 | public static void main(String[] args) 8 | { 9 | int count = 40 * 1000 * 1000; 10 | if (args.length != 0) 11 | { 12 | try 13 | { 14 | count = Integer.parseInt(args[0]); 15 | } 16 | catch (NumberFormatException e) {} 17 | } 18 | System.out.println("Quick Sort demo: generating " + count + " integers..."); 19 | int[] array = new int[count]; 20 | Random rnd = new Random(); 21 | for (int i = 0; i < count; i++) 22 | array[i] = rnd.nextInt(); 23 | int time = (int)System.currentTimeMillis(); 24 | System.out.println("Sorting integers..."); 25 | Arrays.sort(array); 26 | System.out.println("Finished sorting in " + 27 | ((int)System.currentTimeMillis() - time) + " ms"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/simple/ShowProp.java: -------------------------------------------------------------------------------- 1 | 2 | public final class ShowProp 3 | { 4 | 5 | public static void main(String[] args) 6 | { 7 | for (int i = 0; i < args.length; i++) 8 | System.out.println("Command-line argument " + (i + 1) + ": " + args[i]); 9 | System.out.println(); 10 | System.out.println("availableProcessors(): " + 11 | Runtime.getRuntime().availableProcessors()); 12 | printProp("os.name"); 13 | printProp("os.version"); 14 | printProp("os.arch"); 15 | printProp("sun.arch.data.model"); 16 | printProp("sun.cpu.endian"); 17 | printProp("sun.io.unicode.encoding"); 18 | System.out.println(); 19 | printProp("java.version"); 20 | printProp("java.vm.info"); 21 | printProp("java.vm.name"); 22 | printProp("java.vm.version"); 23 | printProp("java.class.version"); 24 | printProp("gnu.classpath.version"); 25 | System.out.println(); 26 | printProp("user.name"); 27 | printProp("user.language"); 28 | if (!printProp("user.region")) 29 | printProp("user.country"); 30 | printProp("user.variant"); 31 | printProp("file.encoding"); 32 | System.out.println(); 33 | printProp("user.dir"); 34 | printProp("user.home"); 35 | printProp("java.home"); 36 | printProp("sun.boot.class.path"); 37 | printProp("java.class.path"); 38 | printProp("sun.boot.library.path"); 39 | printProp("java.library.path"); 40 | printProp("java.ext.dirs"); 41 | printProp("java.io.tmpdir"); 42 | printProp("gnu.classpath.home"); 43 | } 44 | 45 | private static boolean printProp(String name) 46 | { 47 | String value = System.getProperty(name); 48 | if (value == null) 49 | return false; 50 | System.out.println(name + ": " + value); 51 | return true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /examples/simple/ShowTZ.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.*; 3 | 4 | public final class ShowTZ 5 | { 6 | 7 | public static void main(String[] args) 8 | { 9 | long millis = System.currentTimeMillis(); 10 | String tz = null; 11 | try 12 | { 13 | tz = System.getenv("TZ"); 14 | } 15 | catch (Error e) {} 16 | if (tz != null && tz.length() > 0) 17 | System.out.println("getenv(TZ): " + tz); 18 | System.out.println("UTC milliseconds: " + millis); 19 | System.out.println("TimeZone ID: " + TimeZone.getDefault().getID()); 20 | Date date = new Date(millis); 21 | System.out.println("GMT time: " + date.toGMTString()); 22 | System.out.println("Local time: " + date); 23 | System.out.println("Locale-formatted time (" + Locale.getDefault() + "): " + 24 | date.toLocaleString()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/simple/TestCtrlC.java: -------------------------------------------------------------------------------- 1 | class TestCtrlC 2 | { 3 | static void main(final String[] args) // first arg should be: 0 .. 5 4 | { 5 | final char c = args.length > 0 && args[0].length() > 0 ? 6 | args[0].charAt(0) : '\0'; 7 | Runtime.getRuntime().addShutdownHook(new Thread() 8 | { 9 | public void run() 10 | { 11 | System.out.println("Shutdown hook!"); 12 | } 13 | }); 14 | if (c == '4' || c == '5') 15 | { 16 | Thread t = 17 | new Thread() 18 | { 19 | public void run() 20 | { 21 | try 22 | { 23 | for (;;) 24 | { 25 | System.out.println("Next 2!"); 26 | int ch; 27 | if ((ch = System.in.read()) < 0) 28 | { 29 | System.out.println(); 30 | System.out.println("EOF 2!"); 31 | break; 32 | } 33 | if (ch == 'q') 34 | break; 35 | if (ch == 'e') 36 | System.exit(1); 37 | } 38 | } 39 | catch (Exception e) 40 | { 41 | System.out.println("Exc2: " + e); 42 | } 43 | System.out.println("End 2!"); 44 | } 45 | }; 46 | t.setDaemon(args.length == 1); 47 | t.start(); 48 | t = 49 | new Thread() 50 | { 51 | public void run() 52 | { 53 | for (;;) 54 | { 55 | System.out.print("."); 56 | System.out.flush(); 57 | try 58 | { 59 | Thread.sleep(500); 60 | } 61 | catch (Exception e) 62 | { 63 | System.out.println("Exc3: " + e); 64 | } 65 | } 66 | } 67 | }; 68 | t.setDaemon(true); 69 | t.start(); 70 | } 71 | try 72 | { 73 | System.out.println("Loop!"); 74 | for (;;) 75 | { 76 | Thread.yield(); 77 | if (c == '1') 78 | Thread.currentThread().stop(); 79 | if (c == '\0' || c == '0') 80 | break; 81 | try 82 | { 83 | if (c == '3' || c == '5') 84 | { 85 | int ch; 86 | if ((ch = System.in.read()) < 0) 87 | { 88 | System.out.println(); 89 | System.out.println("EOF!"); 90 | break; 91 | } 92 | if (ch == 'Q') 93 | break; 94 | System.out.println("Next!"); 95 | } 96 | } 97 | catch (Exception e) 98 | { 99 | System.out.println("Exc2: " + e); 100 | } 101 | } 102 | } 103 | catch (ThreadDeath e) 104 | { 105 | System.out.println("Death!"); 106 | throw e; 107 | } 108 | System.out.println("End!"); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /examples/simple/TrigCompileAllVmClasses.java: -------------------------------------------------------------------------------- 1 | 2 | // this test should trig inclusion of all VM classes in the compilation set 3 | 4 | import java.lang.management.*; 5 | 6 | class TrigCompileAllVmClasses implements java.io.Serializable 7 | { 8 | static void main(String[] args) throws Throwable 9 | { 10 | if (args == null) 11 | return; 12 | 13 | "".intern(); 14 | new java.lang.ref.SoftReference(""); 15 | new java.util.Date(); 16 | new java.io.File("!").deleteOnExit(); 17 | java.nio.ByteBuffer.allocateDirect(1); 18 | Runtime.getRuntime().exec(""); // throws IndexOutOfBoundsException 19 | Runtime.runFinalizersOnExit(true); 20 | Compiler.command(""); 21 | new java.net.Socket("", 0); 22 | java.lang.reflect.Array.newInstance(byte.class, 0); 23 | Thread.class.getDeclaredFields(); 24 | java.lang.reflect.Proxy.getProxyClass(Object[][].class.getClassLoader(), 25 | new Class[] { Runnable.class }); 26 | 27 | ManagementFactory.getClassLoadingMXBean().isVerbose(); 28 | ManagementFactory.getCompilationMXBean().getTotalCompilationTime(); 29 | ManagementFactory.getMemoryMXBean().setVerbose(false); 30 | ManagementFactory.getRuntimeMXBean().getInputArguments(); 31 | ManagementFactory.getThreadMXBean().getThreadCpuTime(0); 32 | 33 | ((GarbageCollectorMXBean)ManagementFactory.getGarbageCollectorMXBeans(). 34 | get(0)).getCollectionCount(); 35 | ((MemoryManagerMXBean)ManagementFactory.getMemoryManagerMXBeans(). 36 | get(0)).isValid(); 37 | ((MemoryPoolMXBean)ManagementFactory.getMemoryPoolMXBeans(). 38 | get(0)).getCollectionUsageThreshold(); 39 | 40 | Math.IEEEremainder(0,0); 41 | Math.acos(0); 42 | Math.asin(0); 43 | Math.atan2(0,0); 44 | Math.atan(0); 45 | Math.cbrt(0); 46 | Math.ceil(0); 47 | Math.cos(0); 48 | Math.cosh(0); 49 | Math.exp(0); 50 | Math.expm1(0); 51 | Math.floor(0); 52 | Math.hypot(0,0); 53 | Math.log10(0); 54 | Math.log1p(0); 55 | Math.log(0); 56 | Math.pow(0,0); 57 | Math.rint(0); 58 | Math.sin(0); 59 | Math.sinh(0); 60 | Math.sqrt(0); 61 | Math.tan(0); 62 | Math.tanh(0); 63 | 64 | Class.forName("java.lang.VMClassLoader$ClassParser"); 65 | Class.forName("sun.misc.Unsafe").getMethod("getUnsafe", new Class[]{}); 66 | Class.forName("gnu.java.lang.InstrumentationImpl").getMethod( 67 | "getAllLoadedClasses", new Class[]{}); 68 | Class.forName("gnu.java.lang.management.VMOperatingSystemMXBeanImpl"). 69 | getMethod("getSystemLoadAverage", new Class[]{}); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /goclsp/clsp_fix/java/nio/channels/Channel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO (http://www.ivmaisoft.com/jcgo/) 4 | * Class root location: $(JCGO)/goclsp/clsp_fix 5 | * Origin: GNU Classpath v0.93 6 | */ 7 | 8 | /* Channel.java -- 9 | Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. 10 | 11 | This file is part of GNU Classpath. 12 | 13 | GNU Classpath is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2, or (at your option) 16 | any later version. 17 | 18 | GNU Classpath is distributed in the hope that it will be useful, but 19 | WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with GNU Classpath; see the file COPYING. If not, write to the 25 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | 02110-1301 USA. 27 | 28 | Linking this library statically or dynamically with other modules is 29 | making a combined work based on this library. Thus, the terms and 30 | conditions of the GNU General Public License cover the whole 31 | combination. 32 | 33 | As a special exception, the copyright holders of this library give you 34 | permission to link this library with independent modules to produce an 35 | executable, regardless of the license terms of these independent 36 | modules, and to copy and distribute the resulting executable under 37 | terms of your choice, provided that you also meet, for each linked 38 | independent module, the terms and conditions of the license of that 39 | module. An independent module is a module which is not derived from 40 | or based on this library. If you modify this library, you may extend 41 | this exception to your version of the library, but you are not 42 | obligated to do so. If you do not wish to do so, delete this 43 | exception statement from your version. */ 44 | 45 | 46 | package java.nio.channels; 47 | 48 | import java.io.IOException; 49 | import java.io.Closeable; 50 | 51 | public interface Channel extends Closeable 52 | { 53 | /** 54 | * Tells whether this channel is open or not 55 | * 56 | * @return trueif channel is open, 57 | * false otherwise 58 | */ 59 | boolean isOpen(); 60 | 61 | /** 62 | * Closes this channel 63 | * 64 | * @exception IOException If an error occurs 65 | */ 66 | void close() throws IOException; 67 | } 68 | -------------------------------------------------------------------------------- /goclsp/clsp_fix/native/jni/gtk-peer/classpath-0_93-jni-gtk-peer.diff: -------------------------------------------------------------------------------- 1 | diff -ru classpath-0_93/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c patched/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 2 | --- classpath-0_93/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 2006-10-18 03:22:56.000000000 +0400 3 | +++ patched/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 2009-07-28 15:42:06.368075100 +0400 4 | @@ -205,6 +205,7 @@ 5 | init_dpi_conversion_factor (); 6 | 7 | gtktoolkit = (*env)->FindClass(env, "gnu/java/awt/peer/gtk/GtkMainThread"); 8 | + gtktoolkit = (*env)->NewGlobalRef(env, gtktoolkit); 9 | setRunningID = (*env)->GetStaticMethodID (env, gtktoolkit, 10 | "setRunning", "(Z)V"); 11 | } 12 | -------------------------------------------------------------------------------- /goclsp/clsp_fix/resource/gnu/classpath/tools/common/messages.properties: -------------------------------------------------------------------------------- 1 | # MessagesBundle.properties -- English language messages 2 | # Copyright (C) 2006 Free Software Foundation, Inc. 3 | # 4 | # This file is part of GNU Classpath. 5 | # 6 | # GNU Classpath is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | # 11 | # GNU Classpath is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with GNU Classpath; see the file COPYING. If not, write to the 18 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | # 02110-1301 USA. 20 | # 21 | # Linking this library statically or dynamically with other modules is 22 | # making a combined work based on this library. Thus, the terms and 23 | # conditions of the GNU General Public License cover the whole 24 | # combination. 25 | # 26 | # As a special exception, the copyright holders of this library give you 27 | # permission to link this library with independent modules to produce an 28 | # executable, regardless of the license terms of these independent 29 | # modules, and to copy and distribute the resulting executable under 30 | # terms of your choice, provided that you also meet, for each linked 31 | # independent module, the terms and conditions of the license of that 32 | # module. An independent module is a module which is not derived from 33 | # or based on this library. If you modify this library, you may extend 34 | # this exception to your version of the library, but you are not 35 | # obligated to do so. If you do not wish to do so, delete this 36 | # exception statement from your version. 37 | 38 | ClasspathToolParser.JArgument=pass argument to the Java runtime 39 | ClasspathToolParser.JName=OPTION 40 | ClasspathToolParser.VersionFormat={0} (GNU Classpath) {1}\n\nCopyright 2006 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 41 | -------------------------------------------------------------------------------- /goclsp/clsp_fix/resource/gnu/classpath/tools/getopt/messages.properties: -------------------------------------------------------------------------------- 1 | # MessagesBundle.properties -- English language messages 2 | # Copyright (C) 2006 Free Software Foundation, Inc. 3 | # 4 | # This file is part of GNU Classpath. 5 | # 6 | # GNU Classpath is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | # 11 | # GNU Classpath is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with GNU Classpath; see the file COPYING. If not, write to the 18 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | # 02110-1301 USA. 20 | # 21 | # Linking this library statically or dynamically with other modules is 22 | # making a combined work based on this library. Thus, the terms and 23 | # conditions of the GNU General Public License cover the whole 24 | # combination. 25 | # 26 | # As a special exception, the copyright holders of this library give you 27 | # permission to link this library with independent modules to produce an 28 | # executable, regardless of the license terms of these independent 29 | # modules, and to copy and distribute the resulting executable under 30 | # terms of your choice, provided that you also meet, for each linked 31 | # independent module, the terms and conditions of the license of that 32 | # module. An independent module is a module which is not derived from 33 | # or based on this library. If you modify this library, you may extend 34 | # this exception to your version of the library, but you are not 35 | # obligated to do so. If you do not wish to do so, delete this 36 | # exception statement from your version. 37 | 38 | Parser.StdOptions=Standard options 39 | Parser.PrintHelp=print this help, then exit 40 | Parser.PrintVersion=print version number, then exit 41 | Parser.ArgReqd=option ''{0}'' requires an argument 42 | Parser.Unrecognized=unrecognized option ''{0}'' 43 | Parser.NoArg=option ''{0}'' doesn''t allow an argument 44 | Parser.UnrecDash=unrecognized option ''-{0}'' 45 | Parser.TryHelpShort=Try ''{0} -help'' for more information 46 | Parser.TryHelpLong=Try ''{0} --help'' for more information 47 | -------------------------------------------------------------------------------- /goclsp/clsp_fix/resource/gnu/java/locale/LocaleInformation_en.properties: -------------------------------------------------------------------------------- 1 | 2 | # This file is modified by Ivan Maidanski 3 | # Origin: GNU Classpath v0.93 resource 4 | 5 | # LocaleInformation_en.properties -- 6 | # Copyright (C) 1991-2005 Unicode, Inc. 7 | # All rights reserved. Distributed under the Terms of Use 8 | # in http://www.unicode.org/copyright.html. 9 | 10 | currencyFormat=\u00a4#,##0.00;-\u00a4#,##0.00 11 | currenciesSymbol.USD=US$ 12 | 13 | eras=BC\u00aeAD\u00ae 14 | shortDateFormat=M/d/yy 15 | mediumDateFormat=MMM d, yyyy 16 | longDateFormat=MMMM d, yyyy 17 | fullDateFormat=EEEE, MMMM d, yyyy 18 | shortTimeFormat=h:mm a 19 | mediumTimeFormat=h:mm:ss a 20 | longTimeFormat=h:mm:ss a z 21 | fullTimeFormat=h:mm:ss a z 22 | -------------------------------------------------------------------------------- /goclsp/clsp_pgk/gnu/classpath/ConfigAwtPeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/clsp_pgk/gnu/classpath/ConfigAwtPeer.java -- 3 | * Compile-time Java AWT peer configuration constants (Gtk). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2010 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * Not a part of GNU Classpath. 10 | */ 11 | 12 | package gnu.classpath; 13 | 14 | interface ConfigAwtPeer 15 | { 16 | 17 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.headless.HeadlessToolkit"; 18 | String default_awt_peer_toolkit = "gnu.java.awt.peer.gtk.GtkToolkit"; 19 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.qt.QtToolkit"; 20 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.x.XToolkit"; 21 | } 22 | -------------------------------------------------------------------------------- /goclsp/clsp_pqt/gnu/classpath/ConfigAwtPeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/clsp_pqt/gnu/classpath/ConfigAwtPeer.java -- 3 | * Compile-time Java AWT peer configuration constants (Qt). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2010 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * Not a part of GNU Classpath. 10 | */ 11 | 12 | package gnu.classpath; 13 | 14 | interface ConfigAwtPeer 15 | { 16 | 17 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.headless.HeadlessToolkit"; 18 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.gtk.GtkToolkit"; 19 | String default_awt_peer_toolkit = "gnu.java.awt.peer.qt.QtToolkit"; 20 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.x.XToolkit"; 21 | } 22 | -------------------------------------------------------------------------------- /goclsp/clsp_res/gnu/classpath/ConfigAwtPeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/clsp_res/gnu/classpath/ConfigAwtPeer.java -- 3 | * Compile-time Java AWT peer configuration constants (Headless). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2010 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * Not a part of GNU Classpath. 10 | */ 11 | 12 | package gnu.classpath; 13 | 14 | interface ConfigAwtPeer 15 | { 16 | 17 | String default_awt_peer_toolkit = "gnu.java.awt.peer.headless.HeadlessToolkit"; 18 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.gtk.GtkToolkit"; 19 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.qt.QtToolkit"; 20 | // String default_awt_peer_toolkit = "gnu.java.awt.peer.x.XToolkit"; 21 | } 22 | -------------------------------------------------------------------------------- /goclsp/clsp_res/gnu/java/security/Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/clsp_res/gnu/java/security/Configuration.java -- 3 | * Compile-time Java VM security configuration constants. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2010 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * File content origin: GNU Classpath v0.93 10 | */ 11 | 12 | /* Configuration.java.in -- 13 | Copyright (C) 2006 Free Software Foundation, Inc. 14 | 15 | This file is part of GNU Classpath. 16 | 17 | GNU Classpath is free software; you can redistribute it and/or modify 18 | it under the terms of the GNU General Public License as published by 19 | the Free Software Foundation; either version 2, or (at your option) 20 | any later version. 21 | 22 | GNU Classpath is distributed in the hope that it will be useful, but 23 | WITHOUT ANY WARRANTY; without even the implied warranty of 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 | General Public License for more details. 26 | 27 | You should have received a copy of the GNU General Public License 28 | along with GNU Classpath; see the file COPYING. If not, write to the 29 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 30 | 02110-1301 USA. 31 | 32 | Linking this library statically or dynamically with other modules is 33 | making a combined work based on this library. Thus, the terms and 34 | conditions of the GNU General Public License cover the whole 35 | combination. 36 | 37 | As a special exception, the copyright holders of this library give you 38 | permission to link this library with independent modules to produce an 39 | executable, regardless of the license terms of these independent 40 | modules, and to copy and distribute the resulting executable under 41 | terms of your choice, provided that you also meet, for each linked 42 | independent module, the terms and conditions of the license of that 43 | module. An independent module is a module which is not derived from 44 | or based on this library. If you modify this library, you may extend 45 | this exception to your version of the library, but you are not 46 | obligated to do so. If you do not wish to do so, delete this 47 | exception statement from your version. */ 48 | 49 | package gnu.java.security; 50 | 51 | public interface Configuration 52 | { 53 | 54 | boolean DEBUG = false; 55 | } 56 | -------------------------------------------------------------------------------- /goclsp/noopmain/DummyAppMainClass.java: -------------------------------------------------------------------------------- 1 | 2 | public final class DummyAppMainClass 3 | { 4 | 5 | public final static void main(String[] args) {} 6 | } 7 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/classpath/CustomProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/classpath/CustomProperties.java -- 3 | * Template file for custom properties initialization. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2010 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * Not a part of GNU Classpath. 10 | */ 11 | 12 | package gnu.classpath; 13 | 14 | /* Do not edit this file in its original location */ 15 | 16 | import java.util.Properties; 17 | 18 | final class CustomProperties 19 | { /* Template class source file (not a part of GNU Classpath) */ 20 | 21 | static void initCustomProps(Properties properties) 22 | { 23 | /* properties.setProperty(, ); */ 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/classpath/VMAccessorGnuClasspath.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/classpath/VMAccessorGnuClasspath.java -- 3 | * VM cross-package access helper for "gnu.classpath". 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package gnu.classpath; 40 | 41 | import java.io.OutputStream; 42 | 43 | public final class VMAccessorGnuClasspath 44 | { /* used by VM classes only */ 45 | 46 | private VMAccessorGnuClasspath() {} 47 | 48 | public static String getConsoleEncodingVMSystemProperties(OutputStream out) 49 | { 50 | return VMSystemProperties.getConsoleEncoding(out); 51 | } 52 | 53 | public static String getFileEncodingVMSystemProperties() 54 | { 55 | return VMSystemProperties.getFileEncoding(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/classpath/VMVendorInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/classpath/VMVendorInfo.java -- 3 | * Vendor-specific Java VM names. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2013 Ivan Maidanski 7 | * Distributed under the Terms of GNU Classpath License. 8 | ** 9 | * Not a part of GNU Classpath. 10 | */ 11 | 12 | package gnu.classpath; 13 | 14 | interface VMVendorInfo 15 | { 16 | 17 | String JAVA_CLASS_VERSION = "48.0"; 18 | 19 | String JAVA_RUNTIME_NAME = "Java(TM) 2 Runtime Environment"; 20 | 21 | String JAVA_RUNTIME_VERSION = "1.4.2"; 22 | 23 | String JAVA_SPECIFICATION_NAME = "Java Platform API Specification"; 24 | 25 | String JAVA_SPECIFICATION_VENDOR = "Sun Microsystems Inc."; 26 | 27 | String JAVA_SPECIFICATION_VERSION = "1.4"; 28 | 29 | String JAVA_VENDOR = "GNU Classpath"; 30 | 31 | String JAVA_VENDOR_URL = "http://www.classpath.org"; 32 | 33 | String JAVA_VENDOR_URL_BUG = ""; 34 | 35 | String JAVA_VERSION = JAVA_RUNTIME_VERSION; 36 | 37 | String JAVA_VM_INFO = "native mode"; 38 | 39 | String JAVA_VM_NAME = "JCGO client VM"; 40 | 41 | String JAVA_VM_SPECIFICATION_NAME = "Java Virtual Machine Specification"; 42 | 43 | String JAVA_VM_SPECIFICATION_VENDOR = "Sun Microsystems Inc."; 44 | 45 | String JAVA_VM_SPECIFICATION_VERSION = "1.0"; 46 | 47 | String JAVA_VM_VENDOR = "IvMaiSoft LLC"; 48 | 49 | String JAVA_VM_VENDOR_URL = "http://www.ivmaisoft.com/jcgo/"; 50 | } 51 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/lang/VMAccessorGnuJavaLang.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/lang/VMAccessorGnuJavaLang.java -- 3 | * VM cross-package access helper for "gnu.java.lang". 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package gnu.java.lang; 40 | 41 | public final class VMAccessorGnuJavaLang 42 | { /* used by VM classes only */ 43 | 44 | private VMAccessorGnuJavaLang() {} 45 | 46 | public static int getAllLoadedClassCountVMInstrumentationImpl() 47 | { 48 | return VMInstrumentationImpl.getAllLoadedClassCount(); 49 | } 50 | 51 | public static Class[] getAllLoadedClassesVMInstrumentationImpl() 52 | { 53 | return VMInstrumentationImpl.getAllLoadedClasses(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/lang/management/VMCompilationMXBeanImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/lang/management/VMCompilationMXBeanImpl.java -- 3 | * VM specific class compilation bean implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.lang.management; 42 | 43 | final class VMCompilationMXBeanImpl 44 | { 45 | 46 | private VMCompilationMXBeanImpl() {} 47 | 48 | static native long getTotalCompilationTime(); /* JVM-core */ 49 | } 50 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java -- 3 | * VM specific memory GC bean implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.lang.management; 42 | 43 | final class VMGarbageCollectorMXBeanImpl 44 | { 45 | 46 | private VMGarbageCollectorMXBeanImpl() {} 47 | 48 | static native long getCollectionCount(String name); /* JVM-core */ 49 | 50 | static native long getCollectionTime(String name); /* JVM-core */ 51 | } 52 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java -- 3 | * VM specific operating system bean implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.lang.management; 42 | 43 | final class VMOperatingSystemMXBeanImpl 44 | { 45 | 46 | private VMOperatingSystemMXBeanImpl() {} 47 | 48 | static native double getSystemLoadAverage(); /* JVM-core */ 49 | } 50 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/lang/management/VMRuntimeMXBeanImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/lang/management/VMRuntimeMXBeanImpl.java -- 3 | * VM specific runtime bean implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.lang.management; 42 | 43 | import gnu.classpath.SystemProperties; 44 | 45 | final class VMRuntimeMXBeanImpl 46 | { 47 | 48 | private VMRuntimeMXBeanImpl() {} 49 | 50 | static native String[] getInputArguments(); /* JVM-core */ 51 | 52 | static String getName() 53 | { 54 | return SystemProperties.getProperty("java.vm.name") + " " + 55 | SystemProperties.getProperty("java.vm.version"); 56 | } 57 | 58 | static long getStartTime() 59 | { 60 | return VMAccessorJavaLang.getStartTimeMillisVMThread(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/nio/VMPipe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/nio/VMPipe.java -- 3 | * VM specific native pipe implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.nio; 42 | 43 | import java.io.IOException; 44 | 45 | final class VMPipe 46 | { 47 | 48 | private VMPipe() {} 49 | 50 | static VMChannel[] pipe() 51 | throws IOException 52 | { 53 | VMChannel chIn = new VMChannel(); 54 | VMChannel chOut = new VMChannel(); 55 | VMAccessorJavaLang.pipeVMProcess(chIn, chOut); 56 | return new VMChannel[] { chIn, chOut }; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /goclsp/vm/gnu/java/nio/VMSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/gnu/java/nio/VMSelector.java -- 3 | * VM specific file/socket "select" call implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package gnu.java.nio; 42 | 43 | import gnu.java.net.VMAccessorGnuJavaNet; 44 | 45 | import java.io.IOException; 46 | 47 | public final class VMSelector 48 | { 49 | 50 | private VMSelector() {} 51 | 52 | static int select(int[] read, int[] write, int[] except, long timeout) 53 | throws IOException 54 | { 55 | /* not implemented correctly for files and pipes */ 56 | return VMAccessorGnuJavaNet.socketSelectVMPlainSocketImpl(read, write, 57 | except, timeout > 0L ? (timeout < (long) (-1 >>> 1) ? 58 | (int) timeout : -1 >>> 1) : -1); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /goclsp/vm/java/io/VMObjectInputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/java/io/VMObjectInputStream.java -- 3 | * VM specific methods for ObjectInputStream. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package java.io; 42 | 43 | import java.lang.reflect.Constructor; 44 | import java.lang.reflect.VMAccessorJavaLangReflect; 45 | 46 | final class VMObjectInputStream 47 | { 48 | 49 | private VMObjectInputStream() {} 50 | 51 | static Object allocateObject(Class clazz, Class constr_clazz, 52 | Constructor constructor) 53 | throws InstantiationException 54 | { 55 | return VMAccessorJavaLangReflect.allocateObjectVMConstructor(constructor, 56 | clazz); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /goclsp/vm/java/lang/VMFloat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/java/lang/VMFloat.java -- 3 | * VM specific methods for Java "Float" class. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package java.lang; 42 | 43 | final class VMFloat 44 | { 45 | 46 | private VMFloat() {} 47 | 48 | static int floatToIntBits(float value) 49 | { 50 | int bits = floatToRawIntBits(value); 51 | if ((bits & (-1 >>> 1)) > (-1 >>> 1) - (-1 >>> 9)) 52 | bits = (-1 >>> 1) - (-1 >>> 10); 53 | return bits; 54 | } 55 | 56 | static native int floatToRawIntBits(float value); /* JVM-core */ 57 | 58 | static native float intBitsToFloat(int bits); /* JVM-core */ 59 | 60 | static String toString(float value) 61 | { 62 | return VMDouble.toString(value, true); 63 | } 64 | 65 | static float parseFloat(String str) 66 | { 67 | return VMDouble.parseFloat(str); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /goclsp/vm/java/lang/management/VMManagementFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/java/lang/management/VMManagementFactory.java -- 3 | * VM interface for obtaining memory system beans. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package java.lang.management; 42 | 43 | final class VMManagementFactory 44 | { 45 | 46 | private VMManagementFactory() {} 47 | 48 | static String[] getMemoryPoolNames() 49 | { 50 | /* not implemented */ 51 | return new String[] { "MemoryPool" }; 52 | } 53 | 54 | static String[] getMemoryManagerNames() 55 | { 56 | /* not implemented */ 57 | return new String[] { "MemoryManager" }; 58 | } 59 | 60 | static String[] getGarbageCollectorNames() 61 | { 62 | /* not implemented */ 63 | return new String[] { "GarbageCollector" }; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /goclsp/vm/java/lang/reflect/VMArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/java/lang/reflect/VMArray.java -- 3 | * VM specific methods for Java "Array" implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package java.lang.reflect; 42 | 43 | final class VMArray 44 | { 45 | 46 | private VMArray() {} 47 | 48 | static Object createObjectArray(Class type, int len) 49 | { 50 | if (len < 0) 51 | throw new NegativeArraySizeException("length: " + len); 52 | Object[] array = createObjectArray0(type, len); 53 | if (array == null) 54 | throw new OutOfMemoryError(); 55 | return array; 56 | } 57 | 58 | private static native Object[] createObjectArray0(Class type, 59 | int len); /* JVM-core */ 60 | } 61 | -------------------------------------------------------------------------------- /goclsp/vm/java/security/VMAccessController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/goclsp/vm/java/security/VMAccessController.java -- 3 | * VM specific Java access controller implementation. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2007 Ivan Maidanski 7 | * All rights reserved. 8 | ** 9 | * Class specification origin: GNU Classpath v0.93 vm/reference 10 | */ 11 | 12 | /* 13 | * This is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2, or (at your option) 16 | * any later version. 17 | ** 18 | * This software is distributed in the hope that it will be useful, but 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | * General Public License (GPL) for more details. 22 | ** 23 | * Linking this library statically or dynamically with other modules is 24 | * making a combined work based on this library. Thus, the terms and 25 | * conditions of the GNU General Public License cover the whole 26 | * combination. 27 | ** 28 | * As a special exception, the copyright holders of this library give you 29 | * permission to link this library with independent modules to produce an 30 | * executable, regardless of the license terms of these independent 31 | * modules, and to copy and distribute the resulting executable under 32 | * terms of your choice, provided that you also meet, for each linked 33 | * independent module, the terms and conditions of the license of that 34 | * module. An independent module is a module which is not derived from 35 | * or based on this library. If you modify this library, you may extend 36 | * this exception to your version of the library, but you are not 37 | * obligated to do so. If you do not wish to do so, delete this 38 | * exception statement from your version. 39 | */ 40 | 41 | package java.security; 42 | 43 | final class VMAccessController 44 | { 45 | 46 | private VMAccessController() {} 47 | 48 | static void pushContext(AccessControlContext acc) 49 | { 50 | /* not implemented */ 51 | } 52 | 53 | static void popContext() 54 | { 55 | /* not implemented */ 56 | } 57 | 58 | static AccessControlContext getContext() 59 | { 60 | /* not implemented */ 61 | return new AccessControlContext(new ProtectionDomain[0]); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /include/boehmgc/gc_versi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 by Xerox Corporation. All rights reserved. 3 | * Copyright (c) 1996 by Silicon Graphics. All rights reserved. 4 | * Copyright (c) 1998 by Fergus Henderson. All rights reserved. 5 | * Copyright (c) 2000-2009 by Hewlett-Packard Development Company. 6 | * All rights reserved. 7 | * 8 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 9 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 10 | * 11 | * Permission is hereby granted to use or copy this program 12 | * for any purpose, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | */ 17 | 18 | /* This should never be included directly; it is included only from gc.h. */ 19 | #if defined(GC_H) 20 | 21 | /* The policy regarding version numbers: development code has odd */ 22 | /* "minor" number (and "micro" part is 0); when development is finished */ 23 | /* and a release is prepared, "minor" number is incremented (keeping */ 24 | /* "micro" number still zero), whenever a defect is fixed a new release */ 25 | /* is prepared incrementing "micro" part to odd value (the most stable */ 26 | /* release has the biggest "micro" number). */ 27 | 28 | /* The version here should match that in configure/configure.ac */ 29 | /* Eventually this one may become unnecessary. For now we need */ 30 | /* it to keep the old-style build process working. */ 31 | #define GC_TMP_VERSION_MAJOR 7 32 | #define GC_TMP_VERSION_MINOR 4 33 | #define GC_TMP_VERSION_MICRO 0 /* 7.4.0 */ 34 | 35 | #ifdef GC_VERSION_MAJOR 36 | # if GC_TMP_VERSION_MAJOR != GC_VERSION_MAJOR \ 37 | || GC_TMP_VERSION_MINOR != GC_VERSION_MINOR \ 38 | || GC_TMP_VERSION_MICRO != GC_VERSION_MICRO 39 | # error Inconsistent version info. Check README.md, include/gc_version.h and configure.ac. 40 | # endif 41 | #else 42 | # define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR 43 | # define GC_VERSION_MINOR GC_TMP_VERSION_MINOR 44 | # define GC_VERSION_MICRO GC_TMP_VERSION_MICRO 45 | #endif /* !GC_VERSION_MAJOR */ 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/boehmgc/javaxfc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 by Xerox Corporation. All rights reserved. 3 | * Copyright (c) 1996 by Silicon Graphics. All rights reserved. 4 | * Copyright (c) 1998 by Fergus Henderson. All rights reserved. 5 | * Copyright (c) 2000-2009 by Hewlett-Packard Development Company. 6 | * All rights reserved. 7 | * 8 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 9 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 10 | * 11 | * Permission is hereby granted to use or copy this program 12 | * for any purpose, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | */ 17 | 18 | #ifndef GC_H 19 | # include "gc.h" 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* 27 | * Invoke all remaining finalizers that haven't yet been run. (Since the 28 | * notifier is not called, this should be called from a separate thread.) 29 | * This function is needed for strict compliance with the Java standard, 30 | * which can make the runtime guarantee that all finalizers are run. 31 | * This is problematic for several reasons: 32 | * 1) It means that finalizers, and all methods called by them, 33 | * must be prepared to deal with objects that have been finalized in 34 | * spite of the fact that they are still referenced by statically 35 | * allocated pointer variables. 36 | * 1) It may mean that we get stuck in an infinite loop running 37 | * finalizers which create new finalizable objects, though that's 38 | * probably unlikely. 39 | * Thus this is not recommended for general use. 40 | */ 41 | GC_API void GC_CALL GC_finalize_all(void); 42 | 43 | #ifdef __cplusplus 44 | } /* end of extern "C" */ 45 | #endif 46 | -------------------------------------------------------------------------------- /include/jcgocldr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgocldr.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC java_lang_Class CFASTCALL 47 | java_lang_VMClassLoader__getPrimitiveClass0__I( jint type ) 48 | { 49 | return (int)type ? JCGO_CORECLASS_FOR((int)type) : 50 | JCGO_CORECLASS_FOR(OBJT_void); 51 | } 52 | 53 | JCGO_NOSEP_STATIC java_lang_Class CFASTCALL 54 | java_lang_VMClassLoader__loadClass0__LsI( java_lang_String name, 55 | jint nextInner ) 56 | { 57 | return jcgo_findClass(name, (int)nextInner); 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /include/jcgogmc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogmc.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jlong CFASTCALL 47 | gnu_java_lang_management_VMCompilationMXBeanImpl__getTotalCompilationTime__( 48 | void ) 49 | { 50 | return (jlong)0L; 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/jcgogmg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogmg.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jlong CFASTCALL 47 | gnu_java_lang_management_VMGarbageCollectorMXBeanImpl__getCollectionCount__Ls( 48 | java_lang_String name ) 49 | { 50 | return (jlong)JCGO_MEM_GCGETCOUNT(0); 51 | } 52 | 53 | JCGO_NOSEP_STATIC jlong CFASTCALL 54 | gnu_java_lang_management_VMGarbageCollectorMXBeanImpl__getCollectionTime__Ls( 55 | java_lang_String name ) 56 | { 57 | /* not implemented */ 58 | return (jlong)-1L; 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /include/jcgogml.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogml.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | STATICDATA int jcgo_classLoadVerbose = 0; 47 | 48 | JCGO_NOSEP_STATIC jlong CFASTCALL 49 | gnu_java_lang_management_VMClassLoadingMXBeanImpl__getUnloadedClassCount__( 50 | void ) 51 | { 52 | return (jlong)0L; 53 | } 54 | 55 | JCGO_NOSEP_STATIC jint CFASTCALL 56 | gnu_java_lang_management_VMClassLoadingMXBeanImpl__setVerbose0__I( jint set ) 57 | { 58 | int value = jcgo_classLoadVerbose; 59 | if ((int)set) 60 | jcgo_classLoadVerbose = (int)set > 0 ? 1 : 0; 61 | return value; 62 | } 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/jcgogmn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogmn.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jint CFASTCALL 47 | gnu_java_lang_management_VMMemoryManagerMXBeanImpl__isValid0__Ls( 48 | java_lang_String name ) 49 | { 50 | return 1; 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/jcgogmr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogmr.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jObjectArr CFASTCALL 47 | gnu_java_lang_management_VMRuntimeMXBeanImpl__getInputArguments__( void ) 48 | { 49 | /* not implemented */ 50 | return (jObjectArr)jcgo_newArray(JCGO_CLASSREF_OF(java_lang_String__class), 51 | 0, 0); 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/jcgogms.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgogms.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jdouble CFASTCALL 47 | gnu_java_lang_management_VMOperatingSystemMXBeanImpl__getSystemLoadAverage__( 48 | void ) 49 | { 50 | /* not implemented */ 51 | return (jdouble)-1; 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/jcgorarr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgorarr.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jObjectArr CFASTCALL 47 | java_lang_reflect_VMArray__createObjectArray0__LcI( java_lang_Class type, 48 | jint len ) 49 | { 50 | return (jObjectArr)jcgo_newArray(type, 0, len); 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/jcgostkw.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgostkw.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC java_lang_Class CFASTCALL 47 | gnu_classpath_VMStackWalker__getCallingClassAt0__I( jint depth ) 48 | { 49 | /* not implemented */ 50 | return jnull; 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/jcgover.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgover.h -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2014 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_BUILDING_NATIVE 45 | #define JCGO_116 46 | #endif 47 | 48 | #ifdef JCGO_116 /* 1.16 - translator version */ 49 | #define JCGO_VER 110 /* 1.10 - runtime/source version */ 50 | #endif 51 | -------------------------------------------------------------------------------- /include/jcgovstr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/include/jcgovstr.c -- 3 | * a part of the JCGO runtime subsystem. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /** 11 | * This file is compiled together with the files produced by the JCGO 12 | * translator (do not include and/or compile this file directly). 13 | */ 14 | 15 | /* 16 | * This is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | ** 21 | * This software is distributed in the hope that it will be useful, but 22 | * WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | * General Public License (GPL) for more details. 25 | ** 26 | * Linking this library statically or dynamically with other modules is 27 | * making a combined work based on this library. Thus, the terms and 28 | * conditions of the GNU General Public License cover the whole 29 | * combination. 30 | ** 31 | * As a special exception, the copyright holders of this library give you 32 | * permission to link this library with independent modules to produce an 33 | * executable, regardless of the license terms of these independent 34 | * modules, and to copy and distribute the resulting executable under 35 | * terms of your choice, provided that you also meet, for each linked 36 | * independent module, the terms and conditions of the license of that 37 | * module. An independent module is a module which is not derived from 38 | * or based on this library. If you modify this library, you may extend 39 | * this exception to your version of the library, but you are not 40 | * obligated to do so. If you do not wish to do so, delete this 41 | * exception statement from your version. 42 | */ 43 | 44 | #ifdef JCGO_VER 45 | 46 | JCGO_NOSEP_STATIC jObjectArr CFASTCALL 47 | java_lang_VMString__getInitStrings0__( void ) 48 | { 49 | #ifdef OBJT_java_lang_VMString 50 | return (jObjectArr)JCGO_OBJREF_OF(jcgo_internStrs); 51 | #else 52 | return jnull; 53 | #endif 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /include/tinygc/gc_gcj.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) gc_gcj.h -- TinyGC additional header (GCJ-style API). 3 | * Copyright (C) 2006-2009 Ivan Maidanski All rights reserved. 4 | ** 5 | * See also files: tinygc.c, gc.h, gc_mark.h, javaxfc.h 6 | */ 7 | 8 | /* 9 | * This is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2, or (at your option) 12 | * any later version. 13 | ** 14 | * This software is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License (GPL) for more details. 18 | ** 19 | * Linking this library statically or dynamically with other modules is 20 | * making a combined work based on this library. Thus, the terms and 21 | * conditions of the GNU General Public License cover the whole 22 | * combination. 23 | ** 24 | * As a special exception, the copyright holders of this library give you 25 | * permission to link this library with independent modules to produce an 26 | * executable, regardless of the license terms of these independent 27 | * modules, and to copy and distribute the resulting executable under 28 | * terms of your choice, provided that you also meet, for each linked 29 | * independent module, the terms and conditions of the license of that 30 | * module. An independent module is a module which is not derived from 31 | * or based on this library. If you modify this library, you may extend 32 | * this exception to your version of the library, but you are not 33 | * obligated to do so. If you do not wish to do so, delete this 34 | * exception statement from your version. 35 | */ 36 | 37 | #ifndef GC_GCJ_H 38 | #define GC_GCJ_H 39 | 40 | /* TinyGC API is a subset of Boehm-Demers-Weiser Conservative GC API */ 41 | 42 | #ifndef GC_H 43 | #include "gc.h" 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef GC_NEAR 52 | /* TinyGC-specific */ 53 | #define GC_NEAR /* empty */ 54 | #endif 55 | 56 | #define GC_GCJ_MALLOC(size, vtable) GC_gcj_malloc(size, vtable) 57 | 58 | GC_API void GC_CALL GC_init_gcj_malloc(int, void * /* GC_mark_proc */); 59 | 60 | GC_API void GC_NEAR *GC_CALL GC_gcj_malloc(size_t, void GC_NEAR *); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /include/tinygc/gc_mark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) gc_mark.h -- TinyGC additional header (explicit GC marker control). 3 | * Copyright (C) 2006-2010 Ivan Maidanski All rights reserved. 4 | ** 5 | * See also files: tinygc.c, gc.h, gc_gcj.h, javaxfc.h 6 | */ 7 | 8 | /* 9 | * This is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2, or (at your option) 12 | * any later version. 13 | ** 14 | * This software is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License (GPL) for more details. 18 | ** 19 | * Linking this library statically or dynamically with other modules is 20 | * making a combined work based on this library. Thus, the terms and 21 | * conditions of the GNU General Public License cover the whole 22 | * combination. 23 | ** 24 | * As a special exception, the copyright holders of this library give you 25 | * permission to link this library with independent modules to produce an 26 | * executable, regardless of the license terms of these independent 27 | * modules, and to copy and distribute the resulting executable under 28 | * terms of your choice, provided that you also meet, for each linked 29 | * independent module, the terms and conditions of the license of that 30 | * module. An independent module is a module which is not derived from 31 | * or based on this library. If you modify this library, you may extend 32 | * this exception to your version of the library, but you are not 33 | * obligated to do so. If you do not wish to do so, delete this 34 | * exception statement from your version. 35 | */ 36 | 37 | #ifndef GC_MARK_H 38 | #define GC_MARK_H 39 | 40 | /* TinyGC API is a subset of Boehm-Demers-Weiser Conservative GC API */ 41 | 42 | #ifndef GC_H 43 | #include "gc.h" 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #define GC_DS_TAG_BITS 2 52 | #define GC_DS_TAGS ((1 << GC_DS_TAG_BITS) - 1) 53 | 54 | #define GC_DS_LENGTH 0 55 | 56 | typedef void (GC_CALLBACK *GC_start_callback_proc)(void); 57 | GC_API void GC_CALL GC_set_start_callback(GC_start_callback_proc); 58 | GC_API GC_start_callback_proc GC_CALL GC_get_start_callback(void); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/tinygc/javaxfc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) javaxfc.h -- TinyGC additional header (explicit finalization). 3 | * Copyright (C) 2006-2009 Ivan Maidanski All rights reserved. 4 | ** 5 | * See also files: tinygc.c, gc.h, gc_gcj.h, gc_mark.h 6 | */ 7 | 8 | /* 9 | * This is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2, or (at your option) 12 | * any later version. 13 | ** 14 | * This software is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License (GPL) for more details. 18 | ** 19 | * Linking this library statically or dynamically with other modules is 20 | * making a combined work based on this library. Thus, the terms and 21 | * conditions of the GNU General Public License cover the whole 22 | * combination. 23 | ** 24 | * As a special exception, the copyright holders of this library give you 25 | * permission to link this library with independent modules to produce an 26 | * executable, regardless of the license terms of these independent 27 | * modules, and to copy and distribute the resulting executable under 28 | * terms of your choice, provided that you also meet, for each linked 29 | * independent module, the terms and conditions of the license of that 30 | * module. An independent module is a module which is not derived from 31 | * or based on this library. If you modify this library, you may extend 32 | * this exception to your version of the library, but you are not 33 | * obligated to do so. If you do not wish to do so, delete this 34 | * exception statement from your version. 35 | */ 36 | 37 | /* TinyGC API is a subset of Boehm-Demers-Weiser Conservative GC API */ 38 | 39 | #ifndef GC_H 40 | #include "gc.h" 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | extern "C" 45 | { 46 | #endif 47 | 48 | GC_API void GC_CALL GC_finalize_all(void); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/AssertException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/AssertException.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Translator assertion exception. 43 | */ 44 | 45 | final class AssertException extends RuntimeException { 46 | 47 | private static final long serialVersionUID = -7563450024130336533L; 48 | 49 | AssertException() { 50 | super("Assert failure"); 51 | } 52 | 53 | AssertException(String msg) { 54 | super(msg); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/CatchSeq.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/CatchSeq.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for a group of catches. 43 | ** 44 | * Format: CatchStatement CatchStatement CatchStatement CatchSeq 45 | */ 46 | 47 | final class CatchSeq extends LexNode { 48 | 49 | CatchSeq(Term a, Term b) { 50 | super(a, b); 51 | } 52 | 53 | ClassDefinition defineClass(Context c, ObjVector vec) { 54 | assertCond(vec == null); 55 | terms[0].defineClass(c, vec); 56 | return terms[1].defineClass(c, vec); 57 | } 58 | 59 | boolean hasTailReturnOrThrow() { 60 | return terms[0].hasTailReturnOrThrow() 61 | && terms[1].hasTailReturnOrThrow(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/CompilationUnit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/CompilationUnit.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for a whole java file. 43 | ** 44 | * Format: [PackageDeclaration] [ImportDeclarations] [TypeDeclarations] 45 | */ 46 | 47 | final class CompilationUnit extends LexNode { 48 | 49 | CompilationUnit(Term a, Term b, Term c) { 50 | super(a, b, c); 51 | Main.curUnit = this; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/DimSpec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/DimSpec.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for making an array of some type. 43 | ** 44 | * Format: LBRACK RBRACK [Dims] 45 | */ 46 | 47 | final class DimSpec extends LexNode { 48 | 49 | DimSpec(Term c) { 50 | super(c); 51 | } 52 | 53 | void processPass1(Context c) { 54 | terms[0].processPass1(c); 55 | c.typeDims++; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/ExpressionList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/ExpressionList.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for a list of expressions. 43 | ** 44 | * Format: StatementExpression COMMA StatementExpression StatementExpression 45 | * COMMA StatementExpressionList 46 | */ 47 | 48 | final class ExpressionList extends LexNode { 49 | 50 | ExpressionList(Term a, Term c) { 51 | super(a, c); 52 | } 53 | 54 | void processOutput(OutputContext oc) { 55 | terms[0].setVoidExpression(); 56 | terms[0].processOutput(oc); 57 | oc.cPrint(", "); 58 | terms[1].setVoidExpression(); 59 | terms[1].processOutput(oc); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/ExpressionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/ExpressionType.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * The abstract superclass for ClassDefinition and ClassDefnWithDims. 43 | */ 44 | 45 | abstract class ExpressionType { 46 | 47 | ExpressionType() { 48 | } 49 | 50 | abstract ExpressionType indirectedType(); 51 | 52 | abstract String getJniName(); 53 | 54 | abstract String name(); 55 | 56 | abstract String getJavaSignature(); 57 | 58 | abstract String csign(); 59 | 60 | abstract ClassDefinition receiverClass(); 61 | 62 | abstract int objectSize(); 63 | 64 | abstract String castName(); 65 | 66 | abstract ClassDefinition signatureClass(); 67 | 68 | abstract int signatureDimensions(); 69 | 70 | abstract boolean hasRealInstances(); 71 | } 72 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/IfaceDeclaration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/IfaceDeclaration.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for the definition of an interface. 43 | ** 44 | * Format: INTERFACE ID [ExtendsTypes] InterfaceBody 45 | */ 46 | 47 | final class IfaceDeclaration extends ClassDeclaration { 48 | 49 | IfaceDeclaration(Term b, Term c, Term d) { 50 | super(b, Empty.newTerm(), c, d); 51 | } 52 | 53 | boolean isInterface() { 54 | return true; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/ImportDeclaration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/ImportDeclaration.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for the import statement. 43 | ** 44 | * Format: IMPORT QualifiedName [DOT TIMES] SEMI 45 | */ 46 | 47 | final class ImportDeclaration extends LexNode { 48 | 49 | ImportDeclaration(Term b) { 50 | super(b); 51 | } 52 | 53 | void processPass0(Context c) { 54 | c.addImport(terms[0].dottedName()); 55 | } 56 | 57 | void processPass1(Context c) { 58 | } 59 | 60 | void processOutput(OutputContext oc) { 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/ObjHashSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/ObjHashSet.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | import java.util.Enumeration; 42 | 43 | /** 44 | * An unordered set (hash set of objects). 45 | */ 46 | 47 | final class ObjHashSet { 48 | 49 | private final ObjHashtable map = new ObjHashtable(); 50 | 51 | ObjHashSet() { 52 | } 53 | 54 | int size() { 55 | return map.size(); 56 | } 57 | 58 | boolean contains(Object obj) { 59 | return map.get(obj) != null; 60 | } 61 | 62 | boolean remove(Object obj) { 63 | return map.remove(obj) != null; 64 | } 65 | 66 | boolean add(Object obj) { 67 | return map.put(obj, obj) == null; 68 | } 69 | 70 | void clear() { 71 | map.clear(); 72 | } 73 | 74 | Enumeration elements() { 75 | return map.elements(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/PackageDeclaration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/PackageDeclaration.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for a package declaration. 43 | ** 44 | * Format: PACKAGE QualifiedName SEMI 45 | */ 46 | 47 | final class PackageDeclaration extends LexNode { 48 | 49 | PackageDeclaration(Term b) { 50 | super(b); 51 | } 52 | 53 | void processPass0(Context c) { 54 | c.packageName = terms[0].dottedName() + "."; 55 | } 56 | 57 | void processPass1(Context c) { 58 | } 59 | 60 | void processOutput(OutputContext oc) { 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/PrimitiveType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/PrimitiveType.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Grammar production for the primitive types. 43 | */ 44 | 45 | final class PrimitiveType extends LexNode { 46 | 47 | private/* final */int primtype; 48 | 49 | PrimitiveType(int primtype) { 50 | this.primtype = primtype; 51 | } 52 | 53 | boolean isJavaConstant(ClassDefinition ourClass) { 54 | return true; 55 | } 56 | 57 | void processPass1(Context c) { 58 | c.typeClassDefinition = Main.dict.classTable[primtype]; 59 | } 60 | 61 | ExpressionType exprType() { 62 | return Main.dict.classTable[primtype]; 63 | } 64 | 65 | boolean isType() { 66 | return true; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/Token.java: -------------------------------------------------------------------------------- 1 | package com.ivmaisoft.jcgo; 2 | 3 | class Token { 4 | int kind; // token kind 5 | int pos; // token position in the source text (starting at 0) 6 | int col; // token column (starting at 0) 7 | int line; // token line (starting at 1) 8 | String str; // exact string value 9 | String val; // token string value (uppercase if ignoreCase) 10 | } 11 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/TranslateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/TranslateException.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2012 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * Exception used to stop the translation. 43 | */ 44 | 45 | final class TranslateException extends RuntimeException { 46 | 47 | private static final long serialVersionUID = 7942273872694019291L; 48 | 49 | TranslateException(String msg) { 50 | super(msg); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /jtrsrc/com/ivmaisoft/jcgo/VerInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/jtrsrc/com/ivmaisoft/jcgo/VerInfo.java -- 3 | * a part of JCGO translator. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2014 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | package com.ivmaisoft.jcgo; 40 | 41 | /** 42 | * The class contains version information (and other internal configuration 43 | * parameters). 44 | */ 45 | 46 | final class VerInfo { 47 | 48 | /* 49 | * Note 1: odd version numbers are used for inner snapshots. Note 2: This 50 | * version should match that in README and in include/jcgover.h (JCGO_1xx). 51 | */ 52 | static/* final */int VER_NUM = 116; 53 | 54 | static final String COPYRIGHT_AUTHOR = "Copyright (C) 2001-2014 Ivan Maidanski" 55 | .toString(); 56 | 57 | static final String COPYRIGHT = "Copyright 2010 IvMaiSoft LLC. http://www.ivmaisoft.com/jcgo/" 58 | .toString(); 59 | 60 | static final boolean ASSERT_ENABLED = true; 61 | 62 | private VerInfo() { 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /minihdr/common/limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/limits.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _LIMITS_H 40 | #define _LIMITS_H 41 | 42 | #ifndef CHAR_BIT 43 | #define CHAR_BIT 8 44 | #endif 45 | 46 | #ifndef MB_LEN_MAX 47 | #define MB_LEN_MAX 6 48 | #endif 49 | 50 | #ifndef PATH_MAX 51 | #define PATH_MAX 1024 /* or 255, or 259, or 4096 */ 52 | #endif 53 | 54 | #ifndef NAME_MAX 55 | #define NAME_MAX 255 /* or 12, or 31 */ 56 | #endif 57 | 58 | #ifndef PIPE_BUF 59 | #define PIPE_BUF 512 /* or 4096 */ 60 | #endif 61 | 62 | #ifndef OPEN_MAX 63 | #define OPEN_MAX 256 /* or 16, or 64, or 1024, or 10240 */ 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /minihdr/common/locale.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/locale.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _LOCALE_H 40 | #define _LOCALE_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef LC_CTYPE 52 | #define LC_CTYPE 2 /* or 0, or 1, or 3 */ 53 | #endif 54 | 55 | _EXPFUNC char *_RTLENTRY setlocale(int, const char *); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /minihdr/common/malloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/malloc.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _MALLOC_H 40 | #define _MALLOC_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef _HUGEPTRMOD 52 | #define _HUGEPTRMOD /* empty */ /* or __huge */ 53 | #endif 54 | 55 | _EXPFUNC void _HUGEPTRMOD *_RTLENTRY halloc(long, size_t); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /minihdr/common/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/setjmp.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _SETJMP_H 40 | #define _SETJMP_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef _ATTRIBUTE_RETURNS_TWICE 52 | #define _ATTRIBUTE_RETURNS_TWICE /* __attribute__((__returns_twice__)) */ 53 | #endif 54 | 55 | #ifndef _JBLEN 56 | #define _JBLEN 132 57 | #endif 58 | 59 | #ifndef _JBTYPE 60 | #define _JBTYPE long /* or int, or long long, or double */ 61 | #endif 62 | 63 | typedef _JBTYPE jmp_buf[_JBLEN]; 64 | 65 | _EXPFUNC_BUILTIN int _RTLENTRY_BUILTIN setjmp(jmp_buf) 66 | _ATTRIBUTE_RETURNS_TWICE _ATTRIBUTE_NONNULL(1); 67 | 68 | _EXPFUNC_BUILTIN _ATTRIBUTE_NORETURN void _RTLENTRY_BUILTIN longjmp(jmp_buf, 69 | int) _ATTRIBUTE_NONNULL(1); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /minihdr/common/stdarg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/stdarg.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _STDARG_H 40 | #define _STDARG_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef va_start 52 | typedef void *va_list; 53 | #define va_start(ap, parmN) ((void)((ap) = (va_list)((char *)(&parmN) + ((sizeof(parmN) + sizeof(int) - 1) & ~(sizeof(int) - 1))))) 54 | #define va_arg(ap, type) (*(type *)(((*(char **)&(ap)) += (sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)) - ((sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)))) 55 | #define va_end(ap) ((void)0) 56 | #endif 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /minihdr/common/stdint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/stdint.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _STDINT_H 40 | #define _STDINT_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef _INTPTR_T_DEFINED 52 | #define _INTPTR_T_DEFINED 53 | #ifdef _LLP64 54 | typedef ptrdiff_t intptr_t; 55 | #else 56 | typedef int intptr_t; 57 | #endif 58 | #endif 59 | 60 | #ifndef _UINTPTR_T_DEFINED 61 | #define _UINTPTR_T_DEFINED 62 | #ifdef _LLP64 63 | typedef unsigned __int64 uintptr_t; 64 | #else 65 | typedef unsigned long uintptr_t; /* or unsigned */ 66 | #endif 67 | #endif 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /minihdr/common/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/string.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _STRING_H 40 | #define _STRING_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | _EXPFUNC_BUILTIN void *_RTLENTRY_BUILTIN memmove(void *, const void *, 52 | size_t) _ATTRIBUTE_NONNULL(1) _ATTRIBUTE_NONNULL(2); 53 | _EXPFUNC_BUILTIN void *_RTLENTRY_BUILTIN memset(void *, int, size_t) 54 | _ATTRIBUTE_NONNULL(1); 55 | 56 | _EXPFUNC char *_RTLENTRY strerror(int) _ATTRIBUTE_PURE; 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /minihdr/common/sys/utime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/sys/utime.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _SYS_UTIME_H 40 | #define _SYS_UTIME_H 41 | 42 | #ifndef _SYS_TYPES_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef _UTIMBUF_DEFINED 52 | #define _UTIMBUF_DEFINED 53 | struct utimbuf 54 | { 55 | time_t actime; 56 | time_t modtime; 57 | }; 58 | #endif 59 | 60 | _EXPFUNC int _RTLENTRY utime(const char *, const struct utimbuf *) 61 | _ATTRIBUTE_NONNULL(1) _ATTRIBUTE_NONNULL(2); 62 | 63 | _EXPFUNC int _RTLENTRY _wutime(const wchar_t *, const struct utimbuf *) 64 | _ATTRIBUTE_NONNULL(1) _ATTRIBUTE_NONNULL(2); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /minihdr/common/utime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/common/utime.h -- 3 | * a part of the minimalist "libc" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _UTIME_H 40 | #define _UTIME_H 41 | 42 | #ifndef _SYS_UTIME_H 43 | #include 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /minihdr/dos/sys/locking.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/dos/sys/locking.h -- 3 | * a part of the minimalist "libc" headers for JCGO (PC-specific). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _SYS_LOCKING_H 40 | #define _SYS_LOCKING_H 41 | 42 | #ifndef _LK_UNLCK 43 | #define _LK_UNLCK 0 44 | #define _LK_LOCK 1 45 | #define _LK_NBLCK 2 46 | #define _LK_RLCK 3 47 | #define _LK_NBRLCK 4 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /minihdr/unix/ieeefp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/unix/ieeefp.h -- 3 | * a part of the minimalist "libc" headers for JCGO (Unix-specific). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _IEEEFP_H 40 | #define _IEEEFP_H 41 | 42 | #ifndef _STDDEF_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef FP_PD 52 | #define FP_PD 2 53 | #define FP_PE 3 54 | #endif 55 | 56 | #ifndef _FP_PRC_REG 57 | #define _FP_PRC_REG 0 58 | #define _FP_PRC_FLD 0x300 59 | #define _FP_PRC_OFF 0x8 60 | #endif 61 | 62 | /* SysV/386-specific */ 63 | #ifndef fpsetprec 64 | _EXPFUNC int _RTLENTRY __fpsetreg(int, int, int, int); 65 | #define fpsetprec(v) __fpsetreg(v, _FP_PRC_REG, _FP_PRC_FLD, _FP_PRC_OFF) 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /minihdr/unix/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/unix/netinet/tcp.h -- 3 | * a part of the minimalist "libc" headers for JCGO (Unix-specific). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _NETINET_TCP_H 40 | #define _NETINET_TCP_H 41 | 42 | #ifndef TCP_NODELAY 43 | #define TCP_NODELAY 0x1 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /minihdr/unix/sys/wait.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/unix/sys/wait.h -- 3 | * a part of the minimalist "libc" headers for JCGO (Unix-specific). 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2008 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _SYS_WAIT_H 40 | #define _SYS_WAIT_H 41 | 42 | #ifndef _SYS_TYPES_H 43 | #include 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | #ifndef WNOHANG 52 | #define WNOHANG 1 /* or 0x40 */ 53 | #endif 54 | 55 | #ifndef WTERMSIG 56 | #define WTERMSIG(status) (*(int *)&(status) & 0x7f) 57 | #define WEXITSTATUS(status) (((*(int *)&(status)) >> 8) & 0xff) 58 | #endif 59 | 60 | #ifndef WIFEXITED 61 | #define WIFEXITED(status) (WTERMSIG(status) == 0) 62 | #endif 63 | 64 | _EXPFUNC pid_t _RTLENTRY waitpid(pid_t, int *, int); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /minihdr/win/mmsystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/win/mmsystem.h -- 3 | * a part of the minimalist "Win32" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _MMSYSTEM_H 40 | #define _MMSYSTEM_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" 44 | { 45 | #endif 46 | 47 | #ifndef WINMMAPI 48 | #define WINMMAPI __declspec(dllimport) 49 | #endif 50 | 51 | #ifndef WINAPI 52 | #define WINAPI __stdcall 53 | #endif 54 | 55 | typedef unsigned MMRESULT; 56 | 57 | #ifndef MMNOTIMER 58 | 59 | WINMMAPI MMRESULT WINAPI timeBeginPeriod(unsigned); 60 | WINMMAPI MMRESULT WINAPI timeEndPeriod(unsigned); 61 | 62 | #endif 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /minihdr/win/windows.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/win/windows.h -- 3 | * a part of the minimalist "Win32" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _WINDOWS_H 40 | #define _WINDOWS_H 41 | 42 | #ifndef _WINDEF_H 43 | #include 44 | #endif 45 | 46 | #include 47 | 48 | #include 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /minihdr/win/winnls.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) $(JCGO)/minihdr/win/winnls.h -- 3 | * a part of the minimalist "Win32" headers for JCGO. 4 | ** 5 | * Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | * Copyright (C) 2001-2009 Ivan Maidanski 7 | * All rights reserved. 8 | */ 9 | 10 | /* 11 | * This is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2, or (at your option) 14 | * any later version. 15 | ** 16 | * This software is distributed in the hope that it will be useful, but 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * General Public License (GPL) for more details. 20 | ** 21 | * Linking this library statically or dynamically with other modules is 22 | * making a combined work based on this library. Thus, the terms and 23 | * conditions of the GNU General Public License cover the whole 24 | * combination. 25 | ** 26 | * As a special exception, the copyright holders of this library give you 27 | * permission to link this library with independent modules to produce an 28 | * executable, regardless of the license terms of these independent 29 | * modules, and to copy and distribute the resulting executable under 30 | * terms of your choice, provided that you also meet, for each linked 31 | * independent module, the terms and conditions of the license of that 32 | * module. An independent module is a module which is not derived from 33 | * or based on this library. If you modify this library, you may extend 34 | * this exception to your version of the library, but you are not 35 | * obligated to do so. If you do not wish to do so, delete this 36 | * exception statement from your version. 37 | */ 38 | 39 | #ifndef _WINNLS_H 40 | #define _WINNLS_H 41 | 42 | #ifdef _WINDOWS_H 43 | 44 | #ifndef NONLS 45 | 46 | #ifdef __cplusplus 47 | extern "C" 48 | { 49 | #endif 50 | 51 | WINBASEAPI UINT WINAPI GetACP(void); 52 | 53 | WINBASEAPI LCID WINAPI GetUserDefaultLCID(void); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /miscsrc/tpthread/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) sched.h - T-PThread "sched" header. 3 | * Copyright (C) 2006-2007 Ivan Maidanski All rights reserved. 4 | ** 5 | * See also files: pthread.h, tpthread.c 6 | */ 7 | 8 | /* 9 | * This is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2, or (at your option) 12 | * any later version. 13 | ** 14 | * This software is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License (GPL) for more details. 18 | ** 19 | * Linking this library statically or dynamically with other modules is 20 | * making a combined work based on this library. Thus, the terms and 21 | * conditions of the GNU General Public License cover the whole 22 | * combination. 23 | ** 24 | * As a special exception, the copyright holders of this library give you 25 | * permission to link this library with independent modules to produce an 26 | * executable, regardless of the license terms of these independent 27 | * modules, and to copy and distribute the resulting executable under 28 | * terms of your choice, provided that you also meet, for each linked 29 | * independent module, the terms and conditions of the license of that 30 | * module. An independent module is a module which is not derived from 31 | * or based on this library. If you modify this library, you may extend 32 | * this exception to your version of the library, but you are not 33 | * obligated to do so. If you do not wish to do so, delete this 34 | * exception statement from your version. 35 | */ 36 | 37 | #ifndef _SCHED_H 38 | #define _SCHED_H 39 | 40 | /* T-PThread API is a subset of the standard POSIX Threads API */ 41 | 42 | #ifdef __cplusplus 43 | extern "C" 44 | { 45 | #endif 46 | 47 | #ifndef PTHREAD_API 48 | #define PTHREAD_API extern 49 | #endif 50 | 51 | #ifndef PTHREAD_CALL 52 | #define PTHREAD_CALL 53 | #endif 54 | 55 | #define SCHED_OTHER 0 56 | #define SCHED_FIFO 1 57 | #define SCHED_RR 2 58 | 59 | struct sched_param 60 | { 61 | int sched_priority; 62 | }; 63 | 64 | PTHREAD_API int PTHREAD_CALL sched_yield(void); /* async-safe */ 65 | 66 | PTHREAD_API int PTHREAD_CALL sched_get_priority_max(int policy); 67 | PTHREAD_API int PTHREAD_CALL sched_get_priority_min(int policy); 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /mkjcgo/build-win64-mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | 4 | # Build JCGO Win64 binaries for mingw-w64 (mingw32). 5 | # 6 | # Prerequisites: 7 | # * mingw-w64 x86_64-w64-mingw32-gcc.exe (GCC) 4.5.2+ 8 | # * (cd contrib; curl http://www.hboehm.info/gc/gc_source/gc-7.4.0.tar.gz | tar zxf -; mv gc-7.4.0 bdwgc) 9 | # * (cd contrib/bdwgc; curl http://www.hboehm.info/gc/gc_source/libatomic_ops-7.4.0.tar.gz | tar zxf -; mv libatomic_ops-7.4.0 libatomic_ops) 10 | # * Oracle JDK 1.6.0+ (Windows x64) 11 | # * set JAVA_HOME= 12 | 13 | AR=x86_64-w64-mingw32-ar 14 | CC="x86_64-w64-mingw32-gcc -m64" 15 | ARCH=amd64 16 | BASESYS=win32 17 | SYST=mingw64 18 | 19 | # Set current working directory to JCGO root: 20 | cd $(dirname "$0")/.. 21 | 22 | # Build BDWGC (static single- and multi-threaded): 23 | mkdir -p libs/$ARCH/$SYST 24 | mkdir -p .build_tmp/libs-gc-$ARCH-$SYST .build_tmp/libs-gcmt-$ARCH-$SYST 25 | (cd .build_tmp/libs-gc-$ARCH-$SYST; $CC -O2 -fno-strict-aliasing \ 26 | -Wall -Wextra -DALL_INTERIOR_POINTERS -DJAVA_FINALIZATION \ 27 | -DGC_GCJ_SUPPORT -DNO_DEBUGGING -DDONT_USE_USER32_DLL -DUNICODE \ 28 | -I ../../contrib/bdwgc/include -c ../../contrib/bdwgc/*.c \ 29 | ../../contrib/bdwgc/*.cpp; $AR crus ../../libs/$ARCH/$SYST/libgc.a *.o) 30 | (cd .build_tmp/libs-gcmt-$ARCH-$SYST; $CC -O2 -fno-strict-aliasing \ 31 | -Wall -Wextra -DALL_INTERIOR_POINTERS -DJAVA_FINALIZATION \ 32 | -DGC_GCJ_SUPPORT -DNO_DEBUGGING -DLARGE_CONFIG -DUSE_MUNMAP -DGC_THREADS \ 33 | -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -DDONT_USE_USER32_DLL -DUNICODE \ 34 | -I ../../contrib/bdwgc/include -I ../../contrib/bdwgc/libatomic_ops/src \ 35 | -c ../../contrib/bdwgc/*.c ../../contrib/bdwgc/*.cpp; \ 36 | $AR crus ../../libs/$ARCH/$SYST/libgcmt.a *.o) 37 | 38 | # Test compile jcgon: 39 | mkdir -p .build_tmp/test-jcgon-$ARCH-$SYST 40 | (cd .build_tmp/test-jcgon-$ARCH-$SYST; $CC -O2 -fwrapv \ 41 | -fno-strict-aliasing -Wall -DJCGO_FFDATA -DJCGO_LARGEFILE -DJCGO_EXEC \ 42 | -DJCGO_WIN32 -DJCGO_INET -DJCGO_ERRTOLOG -DJCGO_SYSWCHAR \ 43 | -I ../../include -c ../../native/*.c) 44 | 45 | # Build "trjnic" dynamic library (to enable TraceJni utility on Windows): 46 | mkdir -p auxbin/$ARCH/$BASESYS 47 | $CC -O2 -Wall -Wextra -DJCGO_WIN32 \ 48 | -I $JAVA_HOME/include/$BASESYS -I $JAVA_HOME/include \ 49 | -shared -o auxbin/$ARCH/$BASESYS/trjnic.dll -s reflgen/trjnic.c 50 | -------------------------------------------------------------------------------- /mkjcgo/test-miscsrc-cygwin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | 4 | # Compile rarely used C source files explicitly for self-testing. 5 | # Target platform: Win32 (Cygwin) 6 | # 7 | # Prerequisites: 8 | # * Cygwin v2.8+ (GCC 4.8.2) 9 | # * curl ftp://ftp.gnu.org/gnu/classpath/classpath-0.93.tar.gz | tar zxf - 10 | 11 | CC=gcc 12 | SYST=cygwin 13 | 14 | # Set current working directory to JCGO root: 15 | cd $(dirname "$0")/.. 16 | 17 | # Test jnidload: 18 | mkdir -p .build_tmp/test-jnidload-$SYST 19 | $CC -Os -Wall -I classpath-0.93/include -DJNIDLOAD_EXPNAME=JNI_OnLoad_test \ 20 | -DJNIDLOAD_QLIBNAME=\"jnidload-test.dll\" -shared \ 21 | -o .build_tmp/test-jnidload-$SYST/jnidload.dll jnidload/jnidload.c 22 | 23 | # Test miscsrc (jawtstub, tpthread, winmain): 24 | mkdir -p .build_tmp/test-miscsrc-$SYST/inc/X11 25 | echo "typedef int Drawable; typedef int Display; typedef int VisualID; typedef int Colormap;" \ 26 | > .build_tmp/test-miscsrc-$SYST/inc/X11/Xlib.h 27 | $CC -Os -Wall -I classpath-0.93/include -I .build_tmp/test-miscsrc-$SYST/inc \ 28 | -shared -o .build_tmp/test-miscsrc-$SYST/jawt.dll miscsrc/jawtstub/jawt.c 29 | $CC -Os -Wall -Wextra -I minihdr/unix -I minihdr/common \ 30 | -DPTHREAD_USE_GETTIMEOFDAY -DPTHREAD_NO_SIGSET \ 31 | -DPTHREAD_CPUSTATE_SPOFF=16 -c \ 32 | -o .build_tmp/test-miscsrc-$SYST/tpthread.o miscsrc/tpthread/tpthread.c 33 | $CC -Os -Wall -DWINMAIN_PARSECMDLINE -DWINMAIN_EMPTYENV \ 34 | -DWINMAIN_NOSTOREARGV -DWINMAIN_CALLEXIT -c \ 35 | -o .build_tmp/test-miscsrc-$SYST/winmain.o miscsrc/winmain/winmain.c 36 | 37 | # Test minihdr common/unix compilation: 38 | mkdir -p .build_tmp/test-minihdr-unix-$SYST 39 | (cd .build_tmp/test-minihdr-unix-$SYST; $CC -Os -Wall -Wextra -x c \ 40 | -I ../../minihdr/unix -I ../../minihdr/common -c \ 41 | ../../minihdr/common/*.h ../../minihdr/common/sys/*.h \ 42 | ../../minihdr/unix/*.h ../../minihdr/unix/netinet/*.h \ 43 | ../../minihdr/unix/sys/*.h) 44 | 45 | # Test minihdr common/dos compilation: 46 | mkdir -p .build_tmp/test-minihdr-dos-$SYST 47 | (cd .build_tmp/test-minihdr-dos-$SYST; $CC -Os -Wall -Wextra -x c \ 48 | -I ../../minihdr/dos -I ../../minihdr/common -c ../../minihdr/common/*.h \ 49 | ../../minihdr/common/sys/*.h ../../minihdr/dos/*.h \ 50 | ../../minihdr/dos/sys/*.h) 51 | 52 | # Test minihdr-win compilation: 53 | mkdir -p .build_tmp/test-minihdr-win-$SYST 54 | (cd .build_tmp/test-minihdr-win-$SYST; $CC -Os -Wall -Wextra -x c \ 55 | -I ../../minihdr/win -I ../../minihdr/common -c ../../minihdr/win/*.h) 56 | -------------------------------------------------------------------------------- /reflgen/jdkexcl.dat: -------------------------------------------------------------------------------- 1 | # @(#) $(JCGO)/reflgen/jdkexcl.dat -- 2 | # JNI method/field reflection dependency standard non-AWT exclusions 3 | # (input data file for JCGO "TraceJni" utility). 4 | ## 5 | # Project: JCGO (http://www.ivmaisoft.com/jcgo/) 6 | # Copyright (C) 2001-2009 Ivan Maidanski 7 | # Use is subject to license terms. No warranties. All rights reserved. 8 | ## 9 | 10 | java.io.* 11 | java.net.* 12 | java.nio.* 13 | java.security.* 14 | java.security.cert.* 15 | java.text.* 16 | java.util.concurrent.atomic.* 17 | java.util.concurrent.locks.* 18 | java.util.prefs.* 19 | java.util.zip.* 20 | 21 | sun.io.* 22 | sun.misc.* 23 | sun.net.www.protocol.http.* 24 | sun.nio.ch.* 25 | sun.nio.cs.* 26 | sun.reflect.* 27 | sun.reflect.misc.* 28 | sun.security.jca.* 29 | sun.security.pkcs11.wrapper.* 30 | sun.security.util.* 31 | sun.security.x509.* 32 | -------------------------------------------------------------------------------- /stdpaths.in: -------------------------------------------------------------------------------- 1 | ## 2 | # @(#) $(JCGO)/stdpaths.in -- 3 | # response file containing "core" source paths for the "JCGO" translator. 4 | ## 5 | 6 | ## Standard usage (JCGO translator invocation): 7 | # jcgo -d @$~/stdpaths.in 8 | # 9 | ## For small ASCII/Latin1/UTF8-only applications, use "clsp_asc": 10 | # jcgo -src $~/goclsp/clsp_asc @$~/stdpaths.in 11 | # 12 | 13 | ## Notes: 14 | # "-src" is an alias for "-sourcepath"; 15 | # the order (of paths) is significant. 16 | 17 | #-src $~/goclsp/clsp_asc 18 | 19 | -src $~/goclsp/clsp_fix 20 | -src $~/goclsp/clsp_ldr 21 | 22 | #-src $~/goclsp/clsp_pgk 23 | #-src $~/goclsp/clsp_pqt 24 | 25 | -src $~/goclsp/clsp_res 26 | 27 | #-src $~/goclsp/fpvm 28 | 29 | -src $~/goclsp/vm 30 | 31 | -src $~/goclsp/noopmain 32 | -src $~/goclsp/vm_str 33 | -src $~/miscsrc/jpropjav 34 | -src $~/rflg_out 35 | 36 | -src $~/classpath-0.93 37 | 38 | -src $~/classpath-0.93/external/relaxngDatatype 39 | -src $~/classpath-0.93/external/sax 40 | -src $~/classpath-0.93/external/w3c_dom 41 | -------------------------------------------------------------------------------- /sunawt/csrc/awtrescl.in: -------------------------------------------------------------------------------- 1 | 2 | # names list of the Sun J2SE v1.4.2 AWT properties resource classes 3 | # (response file for "JPropJav" utility). 4 | 5 | com.sun.accessibility.internal.resources.accessibility 6 | 7 | com.sun.inputmethods.internal.indicim.resources.DisplayNames 8 | com.sun.inputmethods.internal.thaiim.resources.DisplayNames 9 | 10 | com.sun.swing.internal.plaf.basic.resources.basic 11 | com.sun.swing.internal.plaf.metal.resources.metal 12 | 13 | sun.awt.print.resources.pdialog 14 | sun.awt.print.resources.printcontrol 15 | 16 | sun.awt.resources.awt 17 | sun.awt.windows.awtLocalization 18 | 19 | sun.print.resources.serviceui 20 | -------------------------------------------------------------------------------- /sunawt/csrc/dist_lnx.lst: -------------------------------------------------------------------------------- 1 | 2 | # Contents of "J2SE v1.4.2 Linux X11 AWT for JCGO" binary redistributive pack. 3 | 4 | # 'executable' mode flag is on 5 | bin/libJdbcOdbc.so 6 | bin/libawt.so 7 | bin/libcmm.so 8 | bin/libdcpr.so 9 | bin/libfontmanager.so 10 | bin/libjawt.so 11 | bin/libjpeg.so 12 | bin/libjsound.so 13 | bin/libjsoundalsa.so 14 | bin/libmlib_image.so 15 | 16 | # these files are JCGO-specific 17 | # 'executable' mode flag is on 18 | bin/libgc.so 19 | bin/libjava.so 20 | bin/libjcgoawtl.so 21 | bin/libjcgon.so 22 | bin/libjvm.so 23 | 24 | lib/audio/soundbank.gm 25 | 26 | lib/cmm/CIEXYZ.pf 27 | lib/cmm/GRAY.pf 28 | lib/cmm/LINEAR_RGB.pf 29 | lib/cmm/PYCC.pf 30 | lib/cmm/sRGB.pf 31 | 32 | lib/fonts/LucidaBrightDemiBold.ttf 33 | lib/fonts/LucidaBrightDemiItalic.ttf 34 | lib/fonts/LucidaBrightItalic.ttf 35 | lib/fonts/LucidaBrightRegular.ttf 36 | lib/fonts/LucidaSansDemiBold.ttf 37 | lib/fonts/LucidaSansDemiOblique.ttf 38 | lib/fonts/LucidaSansOblique.ttf 39 | lib/fonts/LucidaSansRegular.ttf 40 | lib/fonts/LucidaTypewriterBold.ttf 41 | lib/fonts/LucidaTypewriterBoldOblique.ttf 42 | lib/fonts/LucidaTypewriterOblique.ttf 43 | lib/fonts/LucidaTypewriterRegular.ttf 44 | lib/fonts/fonts.dir 45 | 46 | # 'executable' mode flag is on 47 | lib/i386/awt_robot 48 | 49 | lib/images/cursors/cursors.properties 50 | lib/images/cursors/invalid32x32.gif 51 | lib/images/cursors/motif_CopyDrop32x32.gif 52 | lib/images/cursors/motif_CopyNoDrop32x32.gif 53 | lib/images/cursors/motif_LinkDrop32x32.gif 54 | lib/images/cursors/motif_LinkNoDrop32x32.gif 55 | lib/images/cursors/motif_MoveDrop32x32.gif 56 | lib/images/cursors/motif_MoveNoDrop32x32.gif 57 | 58 | lib/flavormap.properties 59 | lib/font.properties 60 | lib/psfontj2d.properties 61 | 62 | lib/font.properties.Redhat6.1 63 | lib/font.properties.Redhat8.0 64 | lib/font.properties.SuSE8.0 65 | 66 | # this file is JCGO-specific 67 | lib/rt.jar 68 | -------------------------------------------------------------------------------- /sunawt/csrc/dist_sol.lst: -------------------------------------------------------------------------------- 1 | 2 | # Contents of "J2SE v1.4.2 SunOS X11 AWT for JCGO" binary redistributive pack. 3 | 4 | # 'executable' mode flag is on 5 | bin/libJdbcOdbc.so 6 | bin/libawt.so 7 | bin/libcmm.so 8 | bin/libdcpr.so 9 | bin/libfontmanager.so 10 | bin/libjawt.so 11 | bin/libjpeg.so 12 | bin/libjsound.so 13 | bin/libmlib_image.so 14 | bin/libsunwjdga.so 15 | 16 | # this file is motif21-specific 17 | # 'executable' mode flag is on 18 | bin/libmawt.so 19 | 20 | # these files are JCGO-specific 21 | # 'executable' mode flag is on 22 | bin/libgc.so 23 | bin/libjava.so 24 | bin/libjcgoawtl.so 25 | bin/libjcgon.so 26 | bin/libjvm.so 27 | 28 | lib/audio/soundbank.gm 29 | 30 | lib/cmm/CIEXYZ.pf 31 | lib/cmm/GRAY.pf 32 | lib/cmm/LINEAR_RGB.pf 33 | lib/cmm/PYCC.pf 34 | lib/cmm/sRGB.pf 35 | 36 | lib/fonts/LucidaBrightDemiBold.ttf 37 | lib/fonts/LucidaBrightDemiItalic.ttf 38 | lib/fonts/LucidaBrightItalic.ttf 39 | lib/fonts/LucidaBrightRegular.ttf 40 | lib/fonts/LucidaSansDemiBold.ttf 41 | lib/fonts/LucidaSansRegular.ttf 42 | lib/fonts/LucidaTypewriterBold.ttf 43 | lib/fonts/LucidaTypewriterRegular.ttf 44 | lib/fonts/fonts.dir 45 | 46 | # 'executable' mode flag is on 47 | lib/i386/awt_robot 48 | 49 | lib/images/cursors/cursors.properties 50 | lib/images/cursors/invalid32x32.gif 51 | lib/images/cursors/motif_CopyDrop32x32.gif 52 | lib/images/cursors/motif_CopyNoDrop32x32.gif 53 | lib/images/cursors/motif_LinkDrop32x32.gif 54 | lib/images/cursors/motif_LinkNoDrop32x32.gif 55 | lib/images/cursors/motif_MoveDrop32x32.gif 56 | lib/images/cursors/motif_MoveNoDrop32x32.gif 57 | 58 | lib/flavormap.properties 59 | lib/font.properties 60 | lib/psfontj2d.properties 61 | 62 | lib/font.properties.Cp1251 63 | lib/font.properties.ISO8859_13 64 | lib/font.properties.ISO8859_15 65 | lib/font.properties.ISO8859_2 66 | lib/font.properties.ISO8859_4 67 | lib/font.properties.ISO8859_5 68 | lib/font.properties.ISO8859_7 69 | lib/font.properties.ISO8859_9 70 | lib/font.properties.UTF8 71 | 72 | # this file is JCGO-specific 73 | lib/rt.jar 74 | -------------------------------------------------------------------------------- /sunawt/csrc/dist_win.lst: -------------------------------------------------------------------------------- 1 | 2 | # Contents of "J2SE v1.4.2 Win32 AWT for JCGO" binary redistributive pack. 3 | 4 | bin\JdbcOdbc.dll 5 | bin\awt.dll 6 | bin\cmm.dll 7 | bin\dcpr.dll 8 | bin\fontmanager.dll 9 | bin\jawt.dll 10 | bin\jpeg.dll 11 | bin\jsound.dll 12 | 13 | # these files are JCGO-specific 14 | bin\gc.dll 15 | bin\java.dll 16 | bin\jcgon.dll 17 | bin\jvm.dll 18 | 19 | lib\audio\soundbank.gm 20 | 21 | lib\cmm\CIEXYZ.pf 22 | lib\cmm\GRAY.pf 23 | lib\cmm\LINEAR_RGB.pf 24 | lib\cmm\PYCC.pf 25 | lib\cmm\sRGB.pf 26 | 27 | lib\fonts\LucidaBrightDemiBold.ttf 28 | lib\fonts\LucidaBrightDemiItalic.ttf 29 | lib\fonts\LucidaBrightItalic.ttf 30 | lib\fonts\LucidaBrightRegular.ttf 31 | lib\fonts\LucidaSansDemiBold.ttf 32 | lib\fonts\LucidaSansRegular.ttf 33 | lib\fonts\LucidaTypewriterBold.ttf 34 | lib\fonts\LucidaTypewriterRegular.ttf 35 | 36 | lib\images\cursors\cursors.properties 37 | lib\images\cursors\invalid32x32.gif 38 | lib\images\cursors\win32_CopyDrop32x32.gif 39 | lib\images\cursors\win32_CopyNoDrop32x32.gif 40 | lib\images\cursors\win32_LinkDrop32x32.gif 41 | lib\images\cursors\win32_LinkNoDrop32x32.gif 42 | lib\images\cursors\win32_MoveDrop32x32.gif 43 | lib\images\cursors\win32_MoveNoDrop32x32.gif 44 | 45 | lib\flavormap.properties 46 | lib\font.properties 47 | lib\psfontj2d.properties 48 | 49 | lib\font.properties.CP1250 50 | lib\font.properties.CP1251 51 | lib\font.properties.CP1253 52 | lib\font.properties.CP1254 53 | lib\font.properties.CP1256 54 | lib\font.properties.CP1257 55 | 56 | # this file is JCGO-specific 57 | lib\rt.jar 58 | -------------------------------------------------------------------------------- /sunawt/csrc/javadll/jio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)jio.c 1.4 00/02/02 8 | * 9 | * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. 10 | * 11 | * This software is the proprietary information of Sun Microsystems, Inc. 12 | * Use is subject to license terms. 13 | * 14 | */ 15 | 16 | #include 17 | 18 | #include "jni.h" 19 | 20 | 21 | /* This is a temporary solution until we figure out how to let native 22 | * libraries use jio_* without linking with the VM. 23 | */ 24 | 25 | extern int 26 | jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args); 27 | 28 | JNIEXPORT int 29 | jio_snprintf(char *str, size_t count, const char *fmt, ...) 30 | { 31 | int len; 32 | 33 | va_list args; 34 | va_start(args, fmt); 35 | len = jio_vsnprintf(str, count, fmt, args); 36 | va_end(args); 37 | 38 | return len; 39 | } 40 | 41 | extern int 42 | jio_vfprintf(FILE *, const char *fmt, va_list args); 43 | 44 | JNIEXPORT int 45 | jio_fprintf(FILE *fp, const char *fmt, ...) 46 | { 47 | int len; 48 | 49 | va_list args; 50 | va_start(args, fmt); 51 | len = jio_vfprintf(fp, fmt, args); 52 | va_end(args); 53 | 54 | return len; 55 | } 56 | -------------------------------------------------------------------------------- /sunawt/csrc/jvmdll/jvm_os.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | #include 7 | 8 | #include "jni.h" 9 | 10 | #ifdef WITH_UNDERSCORE 11 | #define JVM_RaiseSignal _JVM_RaiseSignal 12 | #endif 13 | 14 | JNIEXPORT jboolean JNICALL JVM_RaiseSignal(jint sig) 15 | { /* used only for SIGTERM (15) */ 16 | raise(sig); /* should use msvcrt.dll on win32 */ 17 | return JNI_TRUE; 18 | } 19 | -------------------------------------------------------------------------------- /sunawt/csrc/jvmdll/jvm_unix.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | ** 5 | * Comment: contains x11-specific fixes. 6 | */ 7 | 8 | #include "jni.h" 9 | 10 | #ifdef WITH_UNDERSCORE 11 | #define JVM_Sleep _JVM_Sleep 12 | #endif 13 | 14 | JNIEXPORT void JNICALL 15 | JVM_Sleep(JNIEnv *env, jclass threadClass, jlong millis) 16 | { 17 | jmethodID mid = 18 | (*env)->GetStaticMethodID(env, threadClass, "sleep", "(J)V"); 19 | if (mid != 0) 20 | (*env)->CallStaticVoidMethod(env, threadClass, mid, millis); 21 | } 22 | -------------------------------------------------------------------------------- /sunawt/csrc/jvmdll/jvm_win.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | ** 5 | * Comment: contains win32-specific fixes. 6 | */ 7 | 8 | #include "jni.h" 9 | 10 | #ifdef WITH_UNDERSCORE 11 | #define JVM_GetClassName _JVM_GetClassName 12 | #endif 13 | 14 | JNIEXPORT jstring JNICALL 15 | JVM_GetClassName(JNIEnv *env, jclass cls) 16 | { 17 | jclass clazz; 18 | jmethodID mid; 19 | jstring result = NULL; 20 | if ((*env)->EnsureLocalCapacity(env, 3) >= 0) 21 | { 22 | clazz = (*env)->GetObjectClass(env, (jobject)cls); 23 | mid = (*env)->GetMethodID(env, clazz, "getName", "()Ljava/lang/String;"); 24 | result = mid != 0 ? (jstring)(*env)->CallObjectMethod(env, 25 | (jobject)cls, mid) : (*env)->NewStringUTF(env, ""); 26 | (*env)->DeleteLocalRef(env, clazz); 27 | } 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /sunawt/csrc/jvmdll/linux/mapfile-vers-product: -------------------------------------------------------------------------------- 1 | ## 2 | # This file is modified by Ivan Maidanski 3 | # Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | ## 5 | # Comment: contains Linux-specific fixes. 6 | # 7 | 8 | # 9 | # @(#)mapfile-vers-product 10 | # 11 | 12 | # Define public interface. 13 | 14 | SUNWprivate_1.1 { 15 | global: 16 | #JVM_GetClassName; 17 | JVM_RaiseSignal; 18 | JVM_Sleep; 19 | local: 20 | *; 21 | }; 22 | -------------------------------------------------------------------------------- /sunawt/csrc/services/javax.print.PrintServiceLookup: -------------------------------------------------------------------------------- 1 | # Provider for Java Print Service 2 | 3 | #sun.print.UnixPrintServiceLookup 4 | #sun.print.Win32PrintServiceLookup 5 | -------------------------------------------------------------------------------- /sunawt/csrc/services/javax.sound.sampled.spi.MixerProvider: -------------------------------------------------------------------------------- 1 | # Providers for sound mixers 2 | 3 | com.sun.media.sound.PortMixerProvider 4 | com.sun.media.sound.SimpleInputDeviceProvider 5 | 6 | # used on Linux only (ignored if not present) 7 | com.sun.media.sound.DirectAudioDeviceProvider 8 | 9 | # last mixer is default mixer 10 | com.sun.media.sound.HeadspaceMixerProvider 11 | -------------------------------------------------------------------------------- /sunawt/fix/sun/reflect/misc/ConstructorUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)ConstructorUtil.java 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | 13 | package sun.reflect.misc; 14 | 15 | import java.lang.reflect.Constructor; 16 | 17 | public final class ConstructorUtil 18 | { 19 | 20 | private ConstructorUtil() { 21 | } 22 | 23 | public static Constructor[] getConstructors(Class klass) { 24 | ReflectUtil.checkPackageAccess(klass); 25 | return klass.getConstructors(); 26 | } 27 | 28 | public static Constructor getConstructor(Class klass, 29 | Class[] parameterTypes) 30 | throws NoSuchMethodException { 31 | ReflectUtil.checkPackageAccess(klass); 32 | return klass.getConstructor(parameterTypes); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /sunawt/fix/sun/reflect/misc/FieldUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)FieldUtil.java 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | 13 | package sun.reflect.misc; 14 | 15 | import java.lang.reflect.Field; 16 | 17 | public final class FieldUtil 18 | { 19 | 20 | private FieldUtil() { 21 | } 22 | 23 | public static Field[] getFields(Class klass) { 24 | ReflectUtil.checkPackageAccess(klass); 25 | return klass.getFields(); 26 | } 27 | 28 | public static Field getField(Class klass, String name) 29 | throws NoSuchFieldException { 30 | ReflectUtil.checkPackageAccess(klass); 31 | return klass.getField(name); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /sunawt/fix_snd/com/sun/media/sound/HeadspaceMixerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)HeadspaceMixerProvider.java 1.10 03/03/21 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | 13 | package com.sun.media.sound; 14 | 15 | import javax.sound.sampled.Mixer; 16 | import javax.sound.sampled.spi.MixerProvider; 17 | 18 | 19 | /** 20 | * Provider for the Headspace Mixer. 21 | * 22 | * @version 1.10 03/03/21 23 | * @author Kara Kytle 24 | */ 25 | public class HeadspaceMixerProvider extends MixerProvider { 26 | 27 | /** 28 | * Headspace mixer instance 29 | */ 30 | private static HeadspaceMixer theMixer = HeadspaceMixer.getMixerInstance(); 31 | 32 | 33 | /** 34 | * Headspace mixer description. 35 | */ 36 | private static final Mixer.Info info = theMixer.getMixerInfo(); 37 | 38 | public Mixer.Info[] getMixerInfo() { 39 | 40 | Mixer.Info[] localInfo = { info }; 41 | if ((theMixer != null) && theMixer.audioDeviceExists()) { 42 | return localInfo; 43 | } 44 | return new Mixer.Info[0]; 45 | } 46 | 47 | public Mixer getMixer(Mixer.Info info) { 48 | 49 | if ( (info == null) || (info.equals(this.info)) ) { 50 | if ((theMixer != null) && theMixer.audioDeviceExists()) { 51 | return theMixer; 52 | } 53 | } 54 | 55 | throw new IllegalArgumentException("Mixer " + info + " not supported by this provider."); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /sunawt/fix_win/sun/awt/windows/WEmbeddedFramePeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)WEmbeddedFramePeer.java 1.12 03/01/23 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | 13 | package sun.awt.windows; 14 | 15 | import java.awt.Component; 16 | import java.awt.Graphics; 17 | import java.awt.Rectangle; 18 | import sun.awt.EmbeddedFrame; 19 | 20 | public class WEmbeddedFramePeer extends WFramePeer { 21 | 22 | public WEmbeddedFramePeer(EmbeddedFrame target) { 23 | super(target); 24 | } 25 | 26 | Rectangle constrainBounds(int x, int y, int width, int height) { 27 | return new Rectangle(x, y, width, height); 28 | } 29 | 30 | // force AWT into modal state 31 | native void pushModality(); 32 | 33 | // release AWT from modal state 34 | native void popModality(); 35 | 36 | native void create(WComponentPeer parent); 37 | 38 | // suppress printing of an embedded frame. 39 | public void print(Graphics g) {} 40 | } 41 | -------------------------------------------------------------------------------- /sunawt/fix_win/sun/awt/windows/WObjectPeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)WObjectPeer.java 1.14 03/01/23 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | package sun.awt.windows; 13 | 14 | import java.awt.Component; 15 | 16 | abstract class WObjectPeer { 17 | 18 | static { 19 | initIDs(); 20 | } 21 | 22 | long pData; // The Windows handle for the native widget. 23 | Object target; // The associated AWT object. 24 | 25 | private boolean disposed = false; 26 | 27 | public static WObjectPeer getPeerForTarget(Object t) { 28 | WObjectPeer peer = (WObjectPeer) WToolkit.targetToPeer(t); 29 | return peer; 30 | } 31 | 32 | /* 33 | * Subclasses should override disposeImpl() instead of dispose(). Client 34 | * code should always invoke dispose(), never disposeImpl(). 35 | */ 36 | abstract protected void disposeImpl(); 37 | public final void dispose() { 38 | boolean call_disposeImpl = false; 39 | 40 | if (!disposed) { 41 | synchronized (this) { 42 | if (!disposed) { 43 | disposed = call_disposeImpl = true; 44 | } 45 | } 46 | } 47 | 48 | if (call_disposeImpl) { 49 | disposeImpl(); 50 | } 51 | } 52 | protected final boolean isDisposed() { 53 | return disposed; 54 | } 55 | 56 | protected void finalize() throws Throwable { 57 | // Calling dispose() here is essentially a NOP since the current 58 | // implementation prohibts gc before an explicit call to dispose(). 59 | dispose(); 60 | super.finalize(); 61 | } 62 | 63 | /** 64 | * Initialize JNI field and method IDs 65 | */ 66 | private static native void initIDs(); 67 | } 68 | -------------------------------------------------------------------------------- /sunawt/fix_x11/sun/awt/image/WritableRasterNative.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | ** 5 | * Comment: contains x11-specific fixes. 6 | */ 7 | 8 | /* 9 | * @(#)WritableRasterNative.java 1.3 03/01/23 10 | * 11 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 12 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 13 | */ 14 | 15 | 16 | 17 | package sun.awt.image; 18 | 19 | import java.awt.image.WritableRaster; 20 | import java.awt.image.SampleModel; 21 | import java.awt.image.DataBuffer; 22 | import java.awt.Point; 23 | 24 | /** 25 | * WritableRasterNative 26 | * This class exists to wrap a native DataBuffer object. The 27 | * standard WritableRaster object assumes that a DataBuffer 28 | * of a given type (e.g., DataBuffer.TYPE_INT) implies a certain 29 | * subclass (e.g., DataBufferInt). But this is not always the 30 | * case. DataBufferNative, for example, may allow access to 31 | * integer-based data, but it is not DataBufferInt (which is a 32 | * final class and cannot be subclassed). 33 | * So this class exists simply to allow the WritableRaster 34 | * functionality for this new kind of DataBuffer object. 35 | */ 36 | public class WritableRasterNative extends WritableRaster { 37 | 38 | public static WritableRasterNative createNativeRaster(SampleModel sm, DataBuffer db) { 39 | return new WritableRasterNative(sm, db); 40 | } 41 | 42 | protected WritableRasterNative(SampleModel sm, DataBuffer db) { 43 | super(sm, db, new Point(0, 0)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /sunawt/fix_x11/sun/awt/motif/MEmbeddedFramePeer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is modified by Ivan Maidanski 3 | * Project name: JCGO-SUNAWT (http://www.ivmaisoft.com/jcgo/) 4 | */ 5 | 6 | /* 7 | * @(#)MEmbeddedFramePeer.java 1.15 03/01/23 8 | * 9 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 10 | * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11 | */ 12 | 13 | package sun.awt.motif; 14 | 15 | import java.awt.Rectangle; 16 | 17 | import sun.awt.EmbeddedFrame; 18 | 19 | public class MEmbeddedFramePeer extends MFramePeer { 20 | 21 | public MEmbeddedFramePeer(EmbeddedFrame target) { 22 | super(target); 23 | } 24 | 25 | void create(MComponentPeer parent) { 26 | NEFcreate(parent, ((MEmbeddedFrame)target).handle); 27 | } 28 | 29 | public void setVisible(boolean on) { 30 | super.setVisible(on); 31 | if (on) 32 | synthesizeFocusIn(); 33 | } 34 | 35 | Rectangle constrainBounds(int x, int y, int width, int height) { 36 | return new Rectangle(x, y, width, height); 37 | } 38 | 39 | native void NEFcreate(MComponentPeer parent, long handle); 40 | native void pShow(); 41 | 42 | native void synthesizeFocusIn(); 43 | } 44 | -------------------------------------------------------------------------------- /sunawt/mklibs/build-java.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | 4 | # Generate Java source files of "sawt_out". 5 | # 6 | # Prerequisites: 7 | # * Oracle JDK 1.4.2_19 (or 1.6.0+) 8 | # * unzip j2sdk-1_4_2-src-scsl.zip -d /contrib/j2sdk-1_4_2-src-scsl 9 | 10 | SCSL_SRC_RELPATH=contrib/j2sdk-1_4_2-src-scsl/j2se/src 11 | 12 | # Set current working directory to JCGO root: 13 | cd $(dirname "$0")/../.. 14 | 15 | if [ ! -d "auxbin/jre" ]; then 16 | mkjcgo/build-java.sh 17 | fi 18 | 19 | # sawt_out/rflg_out (reflection info generation): 20 | GENREFL_JAR=auxbin/jre/GenRefl.jar 21 | mkdir -p sawt_out/rflg_out 22 | java -Dline.separator=$'\n' -jar $GENREFL_JAR -d sawt_out/rflg_out sunawt/csrc/jre14awt.dat 23 | 24 | # sawt_out/rflg_snd: 25 | mkdir -p sawt_out/rflg_snd 26 | java -Dline.separator=$'\n' -jar $GENREFL_JAR -d sawt_out/rflg_snd sunawt/csrc/jre14snd.dat 27 | 28 | # sawt_out/rflg_com: 29 | mkdir -p sawt_out/rflg_com 30 | java -Dline.separator=$'\n' -jar $GENREFL_JAR -d sawt_out/rflg_com sunawt/csrc/suncomm.dat 31 | 32 | # sawt_out/rflg_out (convert property files to Java source): 33 | java -Dline.separator=$'\n' -jar auxbin/jre/JPropJav.jar -d sawt_out/rflg_out \ 34 | -sourcepath $SCSL_SRC_RELPATH/share/classes -sourcepath $SCSL_SRC_RELPATH/windows/classes \ 35 | @sunawt/csrc/awtrescl.in 36 | -------------------------------------------------------------------------------- /sunawt/stdp_win.in: -------------------------------------------------------------------------------- 1 | ## 2 | # @(#) $(JCGO)/sunawt/stdp_win.in -- 3 | # response file containing the source paths (for the "JCGO" translator) 4 | # to create a GUI app based on Sun J2SE AWT/JSound/SQL front-ends (Win32). 5 | ## 6 | 7 | ## Standard usage (JCGO translator invocation) without sound support: 8 | # jcgo -d @$~\sunawt\stdp_win.in 9 | # 10 | ## Standard usage with J2SE sound support: 11 | # jcgo -src $~\sunawt\fix_snd @$~\sunawt\stdp_win.in 12 | # 13 | 14 | #-src $~/sunawt/fix_snd 15 | 16 | # The next line may be commented out (but not recommended). 17 | -src $~/goclsp/vm_str 18 | 19 | -src $~/goclsp/vm 20 | -src $~/sunawt/fix_win 21 | -src $~/sunawt/fix 22 | 23 | -src $~/sawt_out/rflg_out 24 | -src $~/sawt_out/rflg_snd 25 | 26 | -src $~/contrib/j2sdk1.4.2_19/src/$%java.awt 27 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.imageio 28 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.print 29 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.swing 30 | 31 | -src $~/sawt_out/rflg_com 32 | 33 | -src $~/sunawt/fix_sql 34 | 35 | -src $~/goclsp/clsp_ldr 36 | -src $~/goclsp/clsp_fix 37 | -src $~/goclsp/clsp_res 38 | -src $~/miscsrc/jpropjav 39 | -src $~/rflg_out 40 | 41 | -src $~/classpath-0.93 42 | -src $~/classpath-0.93/external/relaxngDatatype 43 | -src $~/classpath-0.93/external/sax 44 | -src $~/classpath-0.93/external/w3c_dom 45 | 46 | -src $~/contrib/j2sdk1.4.2_19/src 47 | -src $~/contrib/j2sdk-1_4_2-src-scsl/j2se/src/windows/classes 48 | -src $~/contrib/j2sdk-1_4_2-src-scsl/j2se/src/share/classes 49 | 50 | #gnu.java.net.protocol.ftp.Handler 51 | #gnu.java.net.protocol.http.Handler 52 | #gnu.java.net.protocol.jar.Handler 53 | #sun.jdbc.odbc.JdbcOdbcDriver 54 | 55 | #com.sun.java.swing.plaf.motif.MotifLookAndFeel 56 | #com.sun.java.swing.plaf.windows.WindowsLookAndFeel 57 | 58 | #com.sun.comm.Win32Driver 59 | -------------------------------------------------------------------------------- /sunawt/stdp_x11.in: -------------------------------------------------------------------------------- 1 | ## 2 | # @(#) $(JCGO)/sunawt/stdp_x11.in -- 3 | # response file containing the source paths (for the "JCGO" translator) 4 | # to create a GUI app based on Sun J2SE AWT/JSound/SQL front-ends (Motif/X11). 5 | ## 6 | 7 | ## Standard usage (JCGO translator invocation) without sound support: 8 | # jcgo -d @$~/sunawt/stdp_x11.in 9 | # 10 | ## Standard usage with J2SE sound support: 11 | # jcgo -src $~/sunawt/fix_snd @$~/sunawt/stdp_x11.in 12 | # 13 | 14 | #-src $~/sunawt/fix_snd 15 | 16 | # The next line may be commented out (but not recommended). 17 | -src $~/goclsp/vm_str 18 | 19 | -src $~/goclsp/vm 20 | -src $~/sunawt/fix_x11 21 | -src $~/sunawt/fix 22 | 23 | -src $~/sawt_out/rflg_out 24 | -src $~/sawt_out/rflg_snd 25 | 26 | -src $~/contrib/j2sdk1.4.2_19/src/$%java.awt 27 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.imageio 28 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.print 29 | -src $~/contrib/j2sdk1.4.2_19/src/$%javax.swing 30 | 31 | -src $~/sawt_out/rflg_com 32 | 33 | -src $~/sunawt/fix_sql 34 | 35 | -src $~/goclsp/clsp_ldr 36 | -src $~/goclsp/clsp_fix 37 | -src $~/goclsp/clsp_res 38 | -src $~/miscsrc/jpropjav 39 | -src $~/rflg_out 40 | 41 | -src $~/classpath-0.93 42 | -src $~/classpath-0.93/external/relaxngDatatype 43 | -src $~/classpath-0.93/external/sax 44 | -src $~/classpath-0.93/external/w3c_dom 45 | 46 | -src $~/contrib/j2sdk1.4.2_19/src 47 | -src $~/contrib/j2sdk-1_4_2-src-scsl/j2se/src/solaris/classes 48 | -src $~/contrib/j2sdk-1_4_2-src-scsl/j2se/src/share/classes 49 | 50 | #gnu.java.net.protocol.ftp.Handler 51 | #gnu.java.net.protocol.http.Handler 52 | #gnu.java.net.protocol.jar.Handler 53 | #sun.jdbc.odbc.JdbcOdbcDriver 54 | 55 | #com.sun.java.swing.plaf.motif.MotifLookAndFeel 56 | #com.sun.java.swing.plaf.windows.WindowsLookAndFeel 57 | 58 | #com.sun.media.sound.DirectAudioDeviceProvider 59 | 60 | #com.sun.comm.LinuxDriver 61 | #com.sun.comm.SolarisDriver 62 | --------------------------------------------------------------------------------