gcc warnings
This commit is contained in:
parent
cba4fdfe95
commit
20c87f1ab6
@ -46,7 +46,14 @@ char * Yap_blob_to_string(AtomEntry *ref, const char *s0, size_t sz)
|
|||||||
fclose(f); // return the final result.
|
fclose(f); // return the final result.
|
||||||
return s;
|
return s;
|
||||||
} else {
|
} else {
|
||||||
|
#if __APPLE__
|
||||||
size_t sz0 = strlcpy( s, (char *)RepAtom( AtomSWIStream )->StrOfAE, sz);
|
size_t sz0 = strlcpy( s, (char *)RepAtom( AtomSWIStream )->StrOfAE, sz);
|
||||||
|
#else
|
||||||
|
size_t sz0;
|
||||||
|
char *f = (char *)memcpy(s, (char *)RepAtom( AtomSWIStream )->StrOfAE, sz);
|
||||||
|
f[0]='\0';
|
||||||
|
sz0 = f-s;
|
||||||
|
#endif
|
||||||
s = s+sz0;
|
s = s+sz0;
|
||||||
sz -= sz0;
|
sz -= sz0;
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__) || defined(__APPLE__)
|
||||||
|
@ -26,6 +26,7 @@ char *
|
|||||||
findExecutable(const char *av0, char *buffer);
|
findExecutable(const char *av0, char *buffer);
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
1
C/save.c
1
C/save.c
@ -32,6 +32,7 @@ static char SccsId[] = "@(#)save.c 1.3 3/15/90";
|
|||||||
#include "dlmalloc.h"
|
#include "dlmalloc.h"
|
||||||
#endif
|
#endif
|
||||||
#include "yapio.h"
|
#include "yapio.h"
|
||||||
|
#include "YapText.h"
|
||||||
#include "sshift.h"
|
#include "sshift.h"
|
||||||
#include "Foreign.h"
|
#include "Foreign.h"
|
||||||
#if HAVE_STRING_H
|
#if HAVE_STRING_H
|
||||||
|
19
C/scanner.c
19
C/scanner.c
@ -454,7 +454,7 @@ static void Yap_setCurrentSourceLocation(struct stream_desc *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* token table with some help from Richard O'Keefe's PD scanner */
|
/* token table with some help from Richard O'Keefe's PD scanner */
|
||||||
static char chtype0[NUMBER_OF_CHARS + 1] = {
|
char_kind_t Yap_chtype0[NUMBER_OF_CHARS + 1] = {
|
||||||
EF,
|
EF,
|
||||||
/* nul soh stx etx eot enq ack bel bs ht nl vt np cr so si
|
/* nul soh stx etx eot enq ack bel bs ht nl vt np cr so si
|
||||||
*/
|
*/
|
||||||
@ -547,23 +547,6 @@ typedef struct scanner_internals {
|
|||||||
size_t CommentsBuffLim;
|
size_t CommentsBuffLim;
|
||||||
} scanner_internals;
|
} scanner_internals;
|
||||||
|
|
||||||
char *Yap_chtype = chtype0 + 1;
|
|
||||||
|
|
||||||
int Yap_wide_chtype(Int ch) {
|
|
||||||
#if HAVE_WCTYPE_H
|
|
||||||
if (iswalnum(ch)) {
|
|
||||||
if (iswlower(ch))
|
|
||||||
return LC;
|
|
||||||
if (iswdigit(ch))
|
|
||||||
return NU;
|
|
||||||
return UC;
|
|
||||||
}
|
|
||||||
if (iswpunct(ch))
|
|
||||||
return SY;
|
|
||||||
#endif
|
|
||||||
return BS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// standard get char, uses conversion table
|
// standard get char, uses conversion table
|
||||||
// and converts to wide
|
// and converts to wide
|
||||||
#define getchr(inp) inp->stream_wgetc_for_read(inp - GLOBAL_Stream)
|
#define getchr(inp) inp->stream_wgetc_for_read(inp - GLOBAL_Stream)
|
||||||
|
@ -131,6 +131,7 @@ BEGIN_ERRORS()
|
|||||||
E(TYPE_ERROR_CALLABLE, TYPE_ERROR, "callable")
|
E(TYPE_ERROR_CALLABLE, TYPE_ERROR, "callable")
|
||||||
E(TYPE_ERROR_CHAR, TYPE_ERROR, "char")
|
E(TYPE_ERROR_CHAR, TYPE_ERROR, "char")
|
||||||
E(TYPE_ERROR_CHARACTER, TYPE_ERROR, "character")
|
E(TYPE_ERROR_CHARACTER, TYPE_ERROR, "character")
|
||||||
|
E(TYPE_ERROR_CHARACTER_CODE, TYPE_ERROR, "character_code")
|
||||||
E(TYPE_ERROR_COMPOUND, TYPE_ERROR, "compound")
|
E(TYPE_ERROR_COMPOUND, TYPE_ERROR, "compound")
|
||||||
E(TYPE_ERROR_DBREF, TYPE_ERROR, "dbref")
|
E(TYPE_ERROR_DBREF, TYPE_ERROR, "dbref")
|
||||||
E(TYPE_ERROR_DBTERM, TYPE_ERROR, "dbterm")
|
E(TYPE_ERROR_DBTERM, TYPE_ERROR, "dbterm")
|
||||||
|
Reference in New Issue
Block a user