Previous Thread
Next Thread
Print Thread
Joined: Feb 2014
Posts: 852
Likes: 48
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 852
Likes: 48
Hi all,

Could someone pretty please set the ln.historysetmaxlen(10) to something like 100? Or if you're feeling generous, 200?

grep -rn history mame206_extract/mame/plugins/*
mame206_extract/mame/plugins/console/init.lua:31: ln.historysetmaxlen(10)


After 10 lines, I've lost my console history....(sung to the tune of You've lost that lovin' feelin)


from 3rdparty/linenoise/linenoise.c

Code
#define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100

...

static int history_max_len = LINENOISE_DEFAULT_HISTORY_MAX_LEN;
static int history_len = 0;
static char **history = NULL;


Joined: Apr 2015
Posts: 387
E
Senior Member
Offline
Senior Member
E
Joined: Apr 2015
Posts: 387
What stops you from doing a pr?

Joined: Feb 2014
Posts: 852
Likes: 48
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 852
Likes: 48
I guess I'll have to figure it out. I'm a bit of a git idiot.

Joined: Jan 2012
Posts: 881
Likes: 10
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 881
Likes: 10
I'm not opposed to this necessarily but is it necessary to change it by default when you can just edit the script or run "require("linenoise").historysetmaxlen(100)" directly from the console.

Edit: If you need the LINENOISE_DEFAULT_HISTORY_MAX_LEN set to 200 though, that shouldn't be an issue.

Last edited by crazyc; 02/17/19 01:34 PM.
Joined: Feb 2014
Posts: 852
Likes: 48
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 852
Likes: 48
Hi Crazyc,

It's true I can edit the script, but it'd be really nice to just have a bigger default. We're in the 64 bit gigabyte age, what's a few hundred bytes here and there.

I tend to really mess up the mame source doing my learning experiments, so I download a "fresh zip" on every release and it just one of those things that'd just be nice to have set up by default.

At some point I get annoyed enough by the 10 line maximum length to change it.

I remember that I used to have to edit the Makefile under Ubuntu to compile, but now I just download it and make -j4 and I don't even have to modify the makefile anymore which is awesome.


I'm such an idiot/newbie that I still haven't figured out how to just build a single driver.

I suppose I'm going to have to end the suffering...

http://www.mameworld.info/ubbthread...ded&sb=5&o=&fpart=1&vc=1

Joined: Feb 2004
Posts: 2,383
Likes: 98
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,383
Likes: 98
Code
make SUBTARGET=something SOURCES=src/mame/drivers/intellec4.cpp,src/mame/drivers/anzterm.cpp


It's that simple.

Joined: Feb 2014
Posts: 852
Likes: 48
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 852
Likes: 48
You're right! That is easy! Oh man I've been doing it the hard way...


make -j4 SUBTARGET=justapple SOURCES=src/mame/drivers/apple2e.cpp REGENIE=1


./justapple64 apple2e

Joined: Jan 2012
Posts: 881
Likes: 10
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 881
Likes: 10
So I increased the default length to 50 and the max to 200. I also added a history() function that will display the history if called with no parameter or history(n) which will put the nth history entry on the command line.

Joined: Feb 2014
Posts: 852
Likes: 48
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 852
Likes: 48
Many thanks, Crazyc!


Link Copied to Clipboard
Who's Online Now
2 members (Revenant, mixmaster), 20 guests, and 11 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,100
Posts119,249
Members5,019
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com