2003-02-24 22:48:47 +00:00
|
|
|
/*
|
|
|
|
* avrdude - A Downloader/Uploader for AVR device programmers
|
2004-12-22 01:52:45 +00:00
|
|
|
* Copyright (C) 2003-2004 Eric B. Weddington <eric@ecentral.com>
|
2003-02-24 22:48:47 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2012-11-20 14:03:50 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-02-24 22:48:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2022-01-10 13:27:08 +00:00
|
|
|
#include "ac_cfg.h"
|
2009-02-23 22:04:57 +00:00
|
|
|
#include "avrdude.h"
|
2014-05-19 10:01:59 +00:00
|
|
|
#include "libavrdude.h"
|
2003-02-24 22:48:47 +00:00
|
|
|
|
2022-01-07 12:15:55 +00:00
|
|
|
#if defined(WIN32)
|
2003-02-24 22:48:47 +00:00
|
|
|
|
2022-01-07 12:15:55 +00:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2003-02-24 22:48:47 +00:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
static char *filename;
|
|
|
|
|
|
|
|
void win_sys_config_set(char sys_config[PATH_MAX])
|
|
|
|
{
|
2003-04-03 16:46:47 +00:00
|
|
|
sys_config[0] = 0;
|
2022-01-04 22:03:47 +00:00
|
|
|
|
2003-02-24 22:48:47 +00:00
|
|
|
/* Use Windows API call to search for the Windows default system config file.*/
|
2022-01-04 22:03:47 +00:00
|
|
|
SearchPath(NULL, SYSTEM_CONF_FILE, NULL, PATH_MAX, sys_config, &filename);
|
2003-02-24 22:48:47 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void win_usr_config_set(char usr_config[PATH_MAX])
|
|
|
|
{
|
2003-04-03 16:46:47 +00:00
|
|
|
usr_config[0] = 0;
|
2022-01-04 22:03:47 +00:00
|
|
|
|
2003-02-24 22:48:47 +00:00
|
|
|
/* Use Windows API call to search for the Windows default user config file. */
|
2022-01-04 22:03:47 +00:00
|
|
|
SearchPath(NULL, USER_CONF_FILE, NULL, PATH_MAX, usr_config, &filename);
|
2003-02-24 22:48:47 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|