Fossil

Check-in [30d96141]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:int/size_t pedantry
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 30d96141cd8320725eb180f44ba08536c5fb8cb5
User & Date: andygoth 2016-11-04 17:35:45
Context
2016-11-04
21:32
Remove unused, undocumented zTitle argument to style_submenu_element(). This argument appears to have been unused all the way back to [dbda8d6ce9]. check-in: 187424e8 user: andygoth tags: trunk
17:35
int/size_t pedantry check-in: 30d96141 user: andygoth tags: trunk
17:28
Further magic _WIN32_WINNT changes to fix the build for mingw. check-in: 45b76344 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/linenoise.c.

200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

/* snprintf() is not C89, but sqlite3_vsnprintf() can be adapted. */
static int linenoiseSnprintf(char *str, size_t size, const char *format, ...) {
    va_list ap;
    int result;

    va_start(ap,format);
    result = strlen(sqlite3_vsnprintf((int)size,str,format,ap));
    va_end(ap);

    return result;
}
#undef snprintf
#define snprintf linenoiseSnprintf

/* strdup() is technically not standard C89 despite being in POSIX. */
static char *linenoiseStrdup(const char *s) {
    int size = strlen(s)+1;
    char *result = malloc(size);

    if (result) memcpy(result,s,size);

    return result;
}
#undef strdup







|









|







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

/* snprintf() is not C89, but sqlite3_vsnprintf() can be adapted. */
static int linenoiseSnprintf(char *str, size_t size, const char *format, ...) {
    va_list ap;
    int result;

    va_start(ap,format);
    result = (int)strlen(sqlite3_vsnprintf((int)size,str,format,ap));
    va_end(ap);

    return result;
}
#undef snprintf
#define snprintf linenoiseSnprintf

/* strdup() is technically not standard C89 despite being in POSIX. */
static char *linenoiseStrdup(const char *s) {
    size_t size = strlen(s)+1;
    char *result = malloc(size);

    if (result) memcpy(result,s,size);

    return result;
}
#undef strdup