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(int argc, char **argv)
{
+#if defined(__MINGW32__) && !defined(__CYGWIN__)
+ // this will store the fully-qualified path
+ char psp_config_path[MAX_PATH] = "";
+
+ // fetch the path of the executable
+ if(GetModuleFileName(0, psp_config_path, sizeof(psp_config_path) - 1) == 0)
+ {
+ // fall back
+ strcpy(psp_config_path, argv[0]);
+ }
+#endif
if(process_args(argc, argv))
{
+#if defined(__MINGW32__) && !defined(__CYGWIN__)
+ print_path(psp_config_path);
+#else
print_path(argv[0]);
+#endif
}
else
{
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).