The R Project SVN R

Rev

Rev 83696 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83696 Rev 90103
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
-
 
3
 *  Copyright (C) 1997-2026 The R Core Team
3
 *  Copyright (C) 1995-1996 Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1995-1996 Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1997-2023 The R Core Team
-
 
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
9
 *  (at your option) any later version.
Line 67... Line 67...
67
    R_osDynSymbol->getFullDLLPath = getFullDLLPath;
67
    R_osDynSymbol->getFullDLLPath = getFullDLLPath;
68
}
68
}
69
 
69
 
70
static void getSystemError(char *buf, int len)
70
static void getSystemError(char *buf, int len)
71
{
71
{
72
    strcpy(buf, dlerror());
72
    strncpy(buf, dlerror(), --len);
-
 
73
    buf[len] = '\0';
73
}
74
}
74
 
75
 
75
static void *loadLibrary(const char *path, int asLocal, int now,
76
static void *loadLibrary(const char *path, int asLocal, int now,
76
			 const char *search)
77
			 const char *search)
77
{
78
{
Line 216... Line 217...
216
	    strcat(buf, path);
217
	    strcat(buf, path);
217
	}
218
	}
218
    }
219
    }
219
    else {
220
    else {
220
	needed = strlen(path);
221
	needed = strlen(path);
221
	if (bufsize >= needed + 1) 
222
	if (bufsize >= needed + 1)
222
	    strcpy(buf, path);
223
	    strcpy(buf, path);
223
    }
224
    }
224
    return needed;
225
    return needed;
225
}
226
}
226
 
227