Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37898347
en ru br
ALT Linux repos
S:3.1-alt2
5.0: 1.22-alt1
4.1: 1.15.3-alt7
4.0: 1.15.3-alt7
3.0: 1.15.3-alt7

Other repositories
Upstream:1.21

Group :: Development/Other
RPM: astyle

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: astyle-arduino.patch
Download


From: Jens Lody <jens@fedoraproject.org>
Date: Sun, 30 Apr 2017 01:02:39 +0200
Subject: Fix to make astyle usable for arduino, based on
 this patch: https://github.com/arduino/astyle/blob/master/patches/java_package_name.patch
 see: https://github.com/arduino/Arduino/issues/5538 for details
--- a/src/astyle_main.h	2017-04-30 00:30:28.409531985 +0200
+++ b/src/astyle_main.h	2017-04-30 00:31:36.716841967 +0200
@@ -412,6 +412,13 @@
                                                 jobject obj,
                                                 jstring textInJava,
                                                 jstring optionsJava);
+extern "C" EXPORT
+jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass cls);
+extern "C" EXPORT
+jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleMain(JNIEnv* env,
+                                                jobject obj,
+                                                jstring textInJava,
+                                                jstring optionsJava);
 #endif //  ASTYLE_JNI
 
 //----------------------------------------------------------------------------
--- astyle/src/astyle_main.cpp.orig	2017-04-30 00:30:45.651862654 +0200
+++ astyle/src/astyle_main.cpp	2017-04-30 00:48:37.197568109 +0200
@@ -3754,6 +3754,12 @@
 	return env->NewStringUTF(g_version);
 }
 
+extern "C"  EXPORT
+jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass cls)
+{
+	return Java_AStyleInterface_AStyleGetVersion(env, cls);
+}
+
 // called by a java program to format the source code
 // the function name is constructed from method names in the calling java program
 extern "C"  EXPORT
@@ -3795,6 +3801,14 @@
 	return textOutJava;
 }
 
+extern "C"  EXPORT
+jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleMain(JNIEnv* env,
+                                                jobject obj,
+                                                jstring textInJava,
+                                                jstring optionsJava)
+{
+	return Java_AStyleInterface_AStyleMain(env, obj, textInJava, optionsJava);
+}
 // Call the Java error handler
 void STDCALL javaErrorHandler(int errorNumber, const char* errorMessage)
 {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin