SDK update

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

SDK update

Post by Heimdall »

Hi guys, since the toolchain has been updated i propose some extra changes:

Code: Select all

Index: aminclude.am
===================================================================
--- aminclude.am	(revision 2424)
+++ aminclude.am	(working copy)
@@ -167,7 +167,7 @@
 doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
 
 @DX_DOCDIR@/@[email protected]: $(DX_CONFIG) $(pkginclude_HEADERS)
-	rm -rf @DX_DOCDIR@
+#	rm -rf @DX_DOCDIR@
 	$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
 
 DX_CLEANFILES = \
Index: src/debug/scr_printf.c
===================================================================
--- src/debug/scr_printf.c	(revision 2424)
+++ src/debug/scr_printf.c	(working copy)
@@ -356,6 +356,9 @@
 		c = buff[i];
 		switch (c)
 		{
+			case '\r':
+						X = 0;
+						break;
 			case '\n':
 						X = 0;
 						Y ++;
Index: src/prof/prof.c
===================================================================
--- src/prof/prof.c	(revision 2424)
+++ src/prof/prof.c	(working copy)
@@ -79,7 +79,8 @@
 extern int _etext;
 
 /* forward declarations */
-void gprof_cleanup();
+void gprof_cleanup(void);
+void __mcount(unsigned int, unsigned int);
 static SceUInt timer_handler(SceUID uid, SceKernelSysClock *c1, SceKernelSysClock *c2, void *common);
 
 /** Initializes pg library
Index: tools/psp-config.c
===================================================================
--- tools/psp-config.c	(revision 2424)
+++ tools/psp-config.c	(working copy)
@@ -1,3 +1,6 @@
+#if defined(__MINGW32__) && !defined(__CYGWIN__)
+#include <windows.h>
+#endif
 #include <stdio.h>
 #include <getopt.h>
 #include <string.h>
@@ -259,9 +262,24 @@
 
 int main&#40;int argc, char **argv&#41;
 &#123;
+#if defined&#40;__MINGW32__&#41; && !defined&#40;__CYGWIN__&#41;
+	// this will store the fully-qualified path
+	char psp_config_path&#91;MAX_PATH&#93; = "";
+
+	// fetch the path of the executable
+	if&#40;GetModuleFileName&#40;0, psp_config_path, sizeof&#40;psp_config_path&#41; - 1&#41; == 0&#41;
+	&#123;
+		// fall back
+		strcpy&#40;psp_config_path, argv&#91;0&#93;&#41;;
+	&#125;
+#endif
 	if&#40;process_args&#40;argc, argv&#41;&#41;
 	&#123;
+#if defined&#40;__MINGW32__&#41; && !defined&#40;__CYGWIN__&#41;
+		print_path&#40;psp_config_path&#41;;
+#else
 		print_path&#40;argv&#91;0&#93;&#41;;
+#endif
 	&#125;
 	else
 	&#123;
The first change is because every time i generate the documentation, my local SVN gets screwed up because some .svn directory is removed and it shouldn't.

The second (src/debug/scr_printf.c) is just cosmetic. When you use the debug printf function and you write something like: "key: X\r" it prints a funny character in the place of "\r" and there is no carriage return. This patch will allow the carriage to return so you do not need to set the position back to 0,0 to overwrite the previous string.

The 3rd (src/prof/prof.c) is just to reduce some warnings about missing declarations.

The 4th (tools/psp-config.c) is mingw specific so maybe optional for you guys. It is the fix for the pspdev path to work under windows (not cygwin).
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Sending aminclude.am
Sending src/debug/scr_printf.c
Sending src/prof/prof.c
Sending tools/psp-config.c
Transmitting file data ....
Committed revision 2429.
Thanks :)
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Post Reply