- rename lexer and parse files
 
  - fix 'Save as' menu of xconfig
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJch99yAAoJED2LAQed4NsGSKkP/R8hkZ5c+0eQIR7q//NC96lO
 EvjRdxKiRQMbkXMDtacCCQtp7maNKuzykobV9iVYTtI9qTT4THXFISBU2BOufvNL
 1Efs8TdY25iR9B979OuAPxns9uTnty7AvYsqjNF7oF1LCkCa/llitHXP/jLypv0p
 f3xKkwMf8IV3esFBjaZjYmP6XihAaABGLIVbtxjqLhHe8ypFSryxCtF1IbwrRrW8
 vfIpatkTQHPMm93Lf9Wjl/z6dYDCQIuiOKkVd+XJBGYOlLm6xk5IOx22xRo8oWU6
 WpKEqTszOeDt3w0bQAZm7L7ewBun39Z5kU4avznDlzNIxJlaUh3rKK61dGfi2K2q
 vO8HhdmW/gbP1NMJSS69lQ9u2hZcfjwZktW5O81ir8fx21WHunoTMOIyIKVnqmio
 5LxhkmdjjWYAaNkjs1Jqi98xXpwxDnnu969z15KHu2aO2USva19jgGJS6gY9z8BW
 Y+InxIhFA44oRSg7GDHes9laJ2s4TlnKQteumSrA0wGL/1mj5bnZsOy1qMWOkyCz
 DNqAyDGJZ/rKGwDYNlaOjYwPZScK91CDvi8pZtDFvS+haqRiYjA1xE0lcaFy0Qz+
 OUHj8FqPH23TPA8nOQ6nGWlapjfNKYlSPuPVA01p2DT8NLuJsLpRE/1SudSMx0Hc
 0duxKFbQt8Cvv1c/G2/q
 =m2QA
 -----END PGP SIGNATURE-----

Merge tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

 - rename lexer and parse files

 - fix 'Save as' menu of xconfig

* tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: fix 'Save As' menu of xconfig
  kconfig: rename zconf.y to parser.y
  kconfig: rename zconf.l to lexer.l
This commit is contained in:
Linus Torvalds 2019-03-13 10:06:28 -07:00
Родитель add8462a60 8741908b3e
Коммит 5453a3df2a
7 изменённых файлов: 44 добавлений и 14 удалений

Просмотреть файл

@ -143,11 +143,12 @@ help:
# ===========================================================================
# object files used by all kconfig flavours
common-objs := confdata.o expr.o symbol.o preprocess.o zconf.lex.o zconf.tab.o
common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \
symbol.o
$(obj)/zconf.lex.o: $(obj)/zconf.tab.h
HOSTCFLAGS_zconf.lex.o := -I$(src)
HOSTCFLAGS_zconf.tab.o := -I$(src)
$(obj)/lexer.lex.o: $(obj)/parser.tab.h
HOSTCFLAGS_lexer.lex.o := -I$(src)
HOSTCFLAGS_parser.tab.o := -I$(src)
# conf: Used for defconfig, oldconfig and related targets
hostprogs-y += conf

Просмотреть файл

@ -172,7 +172,7 @@ struct symbol {
* int "BAZ Value"
* range 1..255
*
* Please, also check zconf.y:print_symbol() when modifying the
* Please, also check parser.y:print_symbol() when modifying the
* list of property types!
*/
enum prop_type {

Просмотреть файл

@ -15,7 +15,7 @@
#include <unistd.h>
#include "lkc.h"
#include "zconf.tab.h"
#include "parser.tab.h"
#define YY_DECL static int yylex1(void)

Просмотреть файл

@ -90,7 +90,7 @@ void *xrealloc(void *p, size_t size);
char *xstrdup(const char *s);
char *xstrndup(const char *s, size_t n);
/* zconf.l */
/* lexer.l */
int yylex(void);
struct gstr {

Просмотреть файл

Просмотреть файл

@ -1392,6 +1392,8 @@ ConfigMainWindow::ConfigMainWindow(void)
conf_set_changed_callback(conf_changed);
// Set saveAction's initial state
conf_changed();
configname = xstrdup(conf_get_configname());
QAction *saveAsAction = new QAction("Save &As...", this);
connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs()));
QAction *searchAction = new QAction("&Find", this);
@ -1520,17 +1522,29 @@ ConfigMainWindow::ConfigMainWindow(void)
void ConfigMainWindow::loadConfig(void)
{
QString s = QFileDialog::getOpenFileName(this, "", conf_get_configname());
if (s.isNull())
QString str;
QByteArray ba;
const char *name;
str = QFileDialog::getOpenFileName(this, "", configname);
if (str.isNull())
return;
if (conf_read(QFile::encodeName(s)))
ba = str.toLocal8Bit();
name = ba.data();
if (conf_read(name))
QMessageBox::information(this, "qconf", "Unable to load configuration!");
free(configname);
configname = xstrdup(name);
ConfigView::updateListAll();
}
bool ConfigMainWindow::saveConfig(void)
{
if (conf_write(NULL)) {
if (conf_write(configname)) {
QMessageBox::information(this, "qconf", "Unable to save configuration!");
return false;
}
@ -1541,10 +1555,24 @@ bool ConfigMainWindow::saveConfig(void)
void ConfigMainWindow::saveConfigAs(void)
{
QString s = QFileDialog::getSaveFileName(this, "", conf_get_configname());
if (s.isNull())
QString str;
QByteArray ba;
const char *name;
str = QFileDialog::getSaveFileName(this, "", configname);
if (str.isNull())
return;
saveConfig();
ba = str.toLocal8Bit();
name = ba.data();
if (conf_write(name)) {
QMessageBox::information(this, "qconf", "Unable to save configuration!");
}
conf_write_autoconf(0);
free(configname);
configname = xstrdup(name);
}
void ConfigMainWindow::searchConfig(void)

Просмотреть файл

@ -291,6 +291,7 @@ protected:
class ConfigMainWindow : public QMainWindow {
Q_OBJECT
char *configname;
static QAction *saveAction;
static void conf_changed(void);
public: