[Kst] kdeextragear-2/kst/kst/datasources/dirfile

George Staikos staikos at kde.org
Thu Oct 23 23:09:48 CEST 2003


CVS commit by staikos: 

Well the dirfile plugin passes initial testing with this patch.


  M +5 -1      getdata.c   1.12
  M +12 -0     getdata.h   1.6


--- kdeextragear-2/kst/kst/datasources/dirfile/getdata.c  #1.11:1.12
@@ -659,5 +659,9 @@ static int GetSPF(char *field_code, stru
   int spf;
   
-  if (recurse_level>10) {
+  if (!F) { /* don't crash */
+    return(0);
+  }
+
+  if (recurse_level > 10) {
     *error_code = GD_E_RECURSE_LEVEL;
     return(0);

--- kdeextragear-2/kst/kst/datasources/dirfile/getdata.h  #1.5:1.6
@@ -36,4 +36,7 @@ extern const char *GD_ERROR_CODES[15];
 /*                                                                         */
 /***************************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
 int GetData(const char *filename_in, const char *field_code,
              int first_sframe, int first_samp,
@@ -47,4 +50,7 @@ int GetData(const char *filename_in, con
 /*                                                                         */
 /***************************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
 int GetSamplesPerFrame(const char *filename_in, const char *field_name, int *error_code);
 
@@ -54,4 +60,7 @@ int GetSamplesPerFrame(const char *filen
 /*                                                                         */
 /***************************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
 int GetNFrames(const char *filename_in, int *error_code, const char *field);
 
@@ -61,4 +70,7 @@ int GetNFrames(const char *filename_in, 
 /*                                                                         */
 /***************************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
 struct FormatType *GetFormat(const char *filedir, int *error_code);
 




More information about the Kst mailing list