]> git.lyx.org Git - lyx.git/blobdiff - src/support/AppleScriptProxy.cpp
Fix bug 9798.
[lyx.git] / src / support / AppleScriptProxy.cpp
index 8ff1d7609816f07ab54b7366f880510917b77eef..89a6eefc15b054bd28e9b78feacd6cf47fe347ea 100644 (file)
@@ -22,6 +22,8 @@
 #include "support/docstring.h"
 #include "support/debug.h"
 
+#include <stdlib.h>
+
 using namespace std;
 using namespace lyx;
 
@@ -33,7 +35,7 @@ extern "C" LyXFunctionResult applescript_execute_command(const char *cmd, const
        theApp()->dispatch(fr, dr);
 
        string const rval = to_utf8(dr.message());
-       char *cstr =(char*)  malloc((rval.size()+1)*sizeof(rval[0]));
+       char *cstr = (char*) malloc((rval.size()+1)*sizeof(rval[0]));
        strcpy (cstr, rval.c_str());
 
        // Returns the result