Change suppress warnings options to -Wno-sign-compare
since -Wno-error= can be used with gcc 4.2 or later.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
- Introduces new network API class BSocketMessenger, allowing one to send
and receive BMessages across a network socket in a BMessenger-like
fashion. Still very much WIP, hence currently not exposed via public headers.
Based partly on previous work by Axel.
...instead of DrawBox().
Also use ceilf when calculating tab height to prevent non-integral height.
Fixes#12683
More Todo:
You have to understand way too much about how this class draws if you
want to have any hope of overriding one of its Draw... methods and have
it do what you expect.
e.g. The BeBook implies that the tabs are drawn first, then the box, but, we
draw them in the opposite order. Probably better this way but not intuitive.
There are a number of remaining questions:
1. Why don't we need to draw the bottom of tabs if B_FANCY_BORDER?
2. Why do we need to expand tab border horizontally if B_PLAIN_BORDER?
3. Why is the bottom border color (152, 152, 152) instead of (151, 151, 151)?
Add a bunch of TODOs for these questions and more.
There can be some unitiutive gaps between the box border and view
depending on if you choose B_FANCY_BORDER or B_PLAIN_BORDER.
You don't notice the gaps unless the view draws right on it's edge. Some
views, including in Devices and Media Prefs do this though. Media Prefs
further complicates matters by overriding BTabView.
border vs. borders is confusing.
BTabView: Rename border param to borderStyle
BTabView docs: rename border param to borderStyle
enumerate border styles in docs
* New class ElfSymbolLookup. Given a data source, the address of a
symbol table, symbol hash table, string table, and a few more details
it provides access to the symbol information.
* CoreFile: Add CreateSymbolLookup(). Creates an ElfSymbolLookup for a
specified image.
* CoreFileDebuggerInterface: Implement GetSymbolInfos() for regular
images (no commpage yet) via the new functionality.
B{Abstract,Datagram,Secure}Socket:
- Add functionality to listen for and accept new connections, thus allowing
one to use the socket classes for server functionality as well.
BSecureSocket:
- Adjust to take into account differences between how SSL needs to be called
when accepting an incoming connection vs initiating an outbound one.
The handshake on the accepted connection stills fails for unknown reasons
at the moment though.
Note that these changes break the ABI, and thus any packages making use of
them directly will need a rebuild.
* If older generation, check for mobile. If mobile GPU
is found, make an assumption that a LVDS panel exists
and attempt to leverage the vbios or VESA EDID.
* Either gcc or bison version changes are throwing a
sign-compare Werror in the generateda irs nslexer.c
* This simply targets that Werror and disabled it in irs
UserInterfaceListener:
- Add request hook for writing a core file. Implement in TeamDebugger.
Jobs/WriteCoreFileJob:
- Add new job to actually dispatch the core file request via the debugger
interface.
Team{::Listener}
- Add listener event + hook for notifications when a core file gets written.
Implement in CLI.
CliContext:
- Add event flag for core file changed.
CommandLineUserInterface:
- Add 'write-core' command. This optionally takes a path to write the core to,
otherwise one is automatically generated by, similarly to debug reports. As
such, one can now generate cores for things like app_server and registrar
crashes if desired, in addition to reports.
- During the TargetHostInterface refactoring, a parameter was accidentally
omitted for the debugger options in the command line and report interfaces,
leading to a crash during TeamDebugger init.
{CoreFile,Local}DebuggerInterface:
- Add virtual hook for requesting a core dump of the current team. Implement
accordingly in LocalDebuggerInterface, and add a no-op stub in
CoreFileDebuggerInterface.
* The Haiku specific notes contain a structure size field, now.
* Change the type of the count and size fields in the Haiku specific
notes to uint32 also for 64 bit ELF. The size field for a note is a
uint32 anyway.
GraphicalUserInterface:
- The Show() method now checks if the team window is already visible. If
it is, we instead call Activate() to focus it. Fixes the problem that
attempting to attach to a team which we already had a running team
debugger for would appear to do nothing, rather than focusing that window.
TeamDebugger:
- Add accessor to query whether the debugger's interface is a post mortem core
rather than a live team.
TargetHostInterface:
- When asked to locate a team debugger by team_id, as is done for attach
requests to determine if we already have an existing instance attached, skip
over post mortems. This takes care of the potential problem of detecting a
core instance with the same team_id as a live team, and consequently refusing
the attach request.
- When a team debugger quits, use its actual pointer to look it up rather than its
team ID, as we could otherwise potentially remove the wrong one in the case of a
clash.
{Local}TargetHostInterface:
- Add virtual method for requesting a debugger interface for a core file.
Implement accordingly in LocalTargetHostInterface based on Ingo's
previous implementation in the Debugger app.
TeamDebuggerOptions:
- Add an enum to define the type of team debugger request being made
to explicitly make this clear rather than guessing based on the provided
arguments. Set accordingly in the various cases.
- Add a parameter for the core file path.
Debugger:
- Refactor to fill in TeamDebuggerOptions appropriately for core file
requests, and consequently simplify code.
This doesn't yet deal with the fact that a post-mortem team's ID can
clash with that of a live team, which may lead to issues when attempting
to attach to a live team in such a case.
* DebuggerInterface: Add method IsPostMortem() to be able to
descriminate between live and post mortem debugging.
* Add DebuggerInterface implementation CoreFileDebuggerInterface which
provides information from a core file.
* TeamDebugger: Don't start the debug event thread when debugging post
mortem.
* Debugger: New command line variant "Debugger --core <file path>",
which starts a team debugger using the core file.
There are a few issues:
* I didn't see an easy way to integrate with the new
TargetHostInterface framework and I didn't want to get into Rene's
way changing stuff. As a side effect core file debug windows are not
counted and Debugger will quit when only those are left, respectively
will additionally open a teams window on start-up.
* There aren't any symbols yet. We can't use the debug kit
functionality, since it isn't bitness/endianess agnostic. So either
it needs to be adjusted or ported over to Debugger.
* It was previously geared towards shared object files. Now it is
fairly agostic and also accepts e.g. files without sections and
different endianess.
* The handling of 32 vs. 64 bit files works a bit differently now.
There're structs ElfClass32 and ElfClass64 now which provide the
types for the respective bitness.
* Add a few more getters.
* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.
Similar to arch_get_debug_cpu_state(), but the thread whose CPU state
to retrieve is specified. Works only for threads that aren't running,
and on x86-64 we can get the FPU state only when the thread was
interrupted in userland.
Not implemented for the incomplete architecture ports.
This resolves a TODO: We used thread_interrupt() to wake up the thread
from an interruptable wait. However, if the thread was already in the
kernel and about to start waiting, that would have no effect and the
thread would wait anyway. Now there's the new non-blockable signal
SIGNAL_DEBUG_THREAD, which is sent to the thread instead, making sure
that thread doesn't start waiting.
* Makes the shutdown process to rely on the instance that was
running at the time the function is called. While it's unlikely
anyone will see any change from that, this way we will not conflict
in any case with the launch_daemon.
* The reply could have been confused in a remote situation, make
every request to use an it's own object.
* In launch_media_server there was a wrong variable redefinition
too.
* Also fix a possible issue with List::Get, the code returned
after a Get() error. While I doubt if this happens the next
items will be still valid, I prefer to continue until we reach
the end of the items, and in case of a SyncToRoster request we will
at least get the list empty. We might have a blocking call
on the other end, so it's our own duty to at least try to avoid
this in any case. As final result at least we will get the list
empty.
* When the user isn't requesting a custom notification, it will
be a BMediaRoster job to do it.
* Reintroduce BMediaRoster::SyncToServices, this time based on local
message passing rather than a global semaphore.
* SyncToServices is used in launch_media_server to make the process
more launch_daemon safe and faster in the average case.
* It was an error to add notifications in the media_server.
* Fixes#12717.
TargetHostInterfaceRoster:
- Add Listener interface. For now, this simply notifies the listener of
changes to the active debugger count.
- Adjust show new team window command to automatically fall back to the local
interface window if one isn't specified. Fixes the Start New Team menu item
in the TeamWindow. The latter will later be expanded to show the available
interfaces to start a new team on in a submenu.
Debugger:
- Implement roster listener interface in order to know when to attempt
application quit.
With this commit, all necessary work to isolate the application from the target
host is complete, and work on the actual remote interface and protocol can
begin.
TargetHostInterfaceRoster:
- Implement TargetHostInterface's Listener interface. This allows us
to more cheaply track the total number of running team debuggers,
as well as automatically removing an interface that is destroyed.
Application objects:
- Rework and simplify to take into account that they will no longer be
directly managing the team debugger list. Requests to start a new debugger
are still funnelled through here however, and as such, said requests must
now provide the appropriate target host to start with. Adjust StartTeamWindow
and TeamsWindow accordingly.
- On global init, always create an instance of the local interface.
TargetHostInterface:
- Convert to BLooper and implement TeamDebugger's Listener interface.
TargetHostInterfaces now directly manage their TeamDebugger instances,
and consequently take over the equivalent duties that the main application
previously had.
- Adjust signatures of Attach/CreateTeam to add const. Adjust
LocalTargetHostInterface accordingly.
- Add accessor to determine if a given interface is local or not. Will be
needed for the TeamDebugger's file manager eventually so it knows if it
needs to request remote files if no matching local file is found.
- Add accessor to start a TeamDebugger instance, and corresponding options
structure.
TargetHostInterfaceRoster:
- Minor adjustments to host interface initialization to take into account
needing to start the looper.
- Add accessor for number of running team debuggers, for the main app to
use when deciding to quit.
TeamDebugger:
- Add accessor for SettingsManager. Needed for the case of a restart request,
as the host interfaces do not have direct access to it.
TeamsWindow:
- For now, always grab the local host interface when initializing the window.
Once the remote interface is implemented, this will need to be adjusted, but
the appropriate UI for creating/selecting it is needed first anyways.
With these changes, the main application is fully host-agnostic, and all
management of actual debuggers is delegated to their parent host interfaces.
There still needs to be a listener interface for the host interface and/or
roster though, so that the application can be made aware of when debuggers
quit, as this drives whether it's time to terminate the app or not.
* Intel panel scaling was making native mode blury
* Resolutions < native result in a non-scaled screen for now.
* We should look into using the hardware scaler vs
doing fake scaling.
* Resolves#12716
LocalTargetHostInterface:
- Implement the create and attach functionality. In theory, this completes
everything that's needed in order to adjust the main application to do
all debugger interface creation via the roster.
Also make some new const variables to make some math more opaque
i.e. don't use as many magic constants.
This works great at 12pt font size, decenly at all other sizes. There is a
bit of jitter at 13pt and 24pt for some reason when moving from a default
settings view to another settings view.
...to just DefaultSettingsView
It is just as obvious what it does in context, but shorter.
Rename the function it contains from
BuildDefaultScreenSaverSettingsView to
BuildDefaultSettingsView
Make the square a rectangle with Golden Ratio
Use Set*UIColor() instead of Set*Color(ui_color())
Use B_CONTROL_BORDER_COLOR instead of hardcoding
Sort out copyright -- Haiku, Inc. didn't exist before 2003
Use variable width spacing based on font size from ControlLook
Removed unnecessary #includes
Did a little pixel pushing to make sure that everything is spaced
nicely and to ensure everything lies on integer pixel boundries.
instead of using boring StringItems
ColorItem draws a small colored rectangle left of the string
RainbowItem draws a rainbow colored rectangle left of the string
* The event time is managed through the main node control
loop.
* Make the mix thread to activate only when needed.
* Make the locking more simple and remove a race condition,
this will make the thread to be more silent too.
TargetHostInterfaceRoster:
- Provides a singleton interface to enumerate both the available interface
types, and all currently running instances. This will provide clients like
the TeamsWindow with a way to present the user with all available types,
as well as the necessary information to configure/instantiate them.
TargetHostInterfaceInfo:
- Provides an information object for each available type of interface,
including an optional description of the settings needed to configure it.
Callers can then use this to provide a configuration UI as needed, and
once complete, request a corresponding interface instance for the desired
configuration.
{Local}TargetHostInterface:
- Add Settings parameter to Init(). Adjust LocalTargetHostInterface
accordingly.
LocalTargetHostInterfaceInfo:
- Implementation of TargetHostInterfaceInfo for the local system case.
TargetHostInterface:
- Provide interface for tracking list of TeamDebuggers attached to this
particular interface instance. Will eventually replace the current
mechanism where the Debugger app tracks this directly.
LocalTargetHostInterface:
- Cleanups.
* The old debug system was too complex and made
troubleshooring difficult. (it also was unique
like a snowflake... which we don't want)
* Move to the classic TRACE / ERROR a large majority
of the code has changed to.
* I like trace statements, but drop some obvious ones
* Fix style issues along the way
* VESA under Intel GPU's is generally native resolution
* These never worked well pre-rewrite, so lets disable
them for now.
* I'd like testers to enable them slowly and report
problems as enhancements.
* While no removeable media is present, ahci
ports continuously reset.
* hrev49665 made the port resets slightly more
agressive resulting in strange removeable media
behaviour.
* Lots of red herrings made this one take a while
to figure out.
* Resolves#12415
* This simplifies the reset process again while keeping
my original cleanups.
* I think trying a software reset before a hardware
reset is desireable, however lets work on base
functionality first.
* It caused parameters to change with delay, because the
event has been enqueued in the event queue with real time.
* Please don't rely on system_time.
* Fixes#5106.
* Fixes issues with launch_daemon restart.
* Rely on what the actual response from the server is
instead to naively try to kill it.
* Remove snoozing and make the restart process very fast.
* Any app should rely on notifications anyway.
* Due to some reason a few months ago the media_addon_server
locked up very often making the notification service unreliable,
today this issue looks like solved. This made possible the recent
improvements.
TeamsWindow:
- On startup, instantiate a LocalTargetHostInterface, and pass it
to the TeamsListView.
TeamsListView:
- Refactor building and updating the teams list to work via TargetHost
and its respective listener interface rather than the previous combination
of be_roster and manual polling.
- Style fixes.
LocalTargetHostInterface:
- When receiving team creation events, check if the team in question actually
contains a valid app image. The kernel's create notification is sent before
the team is completely initialized, and consequently if our get_team_info()
call gets in quickly enough, the images may not be loaded yet. If this
situation is detected, add the team ID to a wait list.
- If we have waiting teams, listen for new messages with a short timeout. If no
message is received within the timeout, walk our list of waiting teams and
see if they are fully initialized yet, and if so, dispatch the appropriate
event.
* Remove SyncToServices, I will probably readd it in future
but this time using a local synchronization service more than
relying on the media_server to release the semaphore.
* Due to some discussions today in mailing list I decided
to step back and retry the initial way to notify media rosters
about media services status. It is woking by using two different
notifications for reconnecting to the media_server and notifying
the local subscribers.
* This speed up the media services restart.
* Sorry for the noise and very thanks for reviewing my code to
everyone.
* The global synchro semaphore is provided with the purpose of
being used to avoid threads lock up when the media_server is in
an undefined state. There's still room for improvements.
* BMediaRoster::SyncToServices lock up on a semaphore until
the multi_audio correctly connected to the mixer.
- Add new model class TargetHost for host-specific information such as
the running team list.
- Add new interface class TargetHostInterface and implementing subclass
LocalTargetHostInterface. Not yet complete/usable due to some as of yet
unresolved issues with the involved system APIs.
DebuggerInterface:
- Refactor into abstract base class.
- Introduce interface configuration abstract base class.
- Move existing implementation into LocalDebuggerInterface and add
corresponding configuration class.
Debugger:
- Adjust to instantiate LocalDebuggerInterface.
In and of itself no functional change, but paves the way for further
refactoring to make the debugger fully interface-agnostic (this isn't yet
the case for retrieving target system information such as the team listing,
and creating/attaching to teams).
TeamDebugger:
- Rather than instantiating the DebuggerInterface directly, we now
expect it to be given to us externally. This allows TeamDebugger
to be agnostic of where the team actually resides.
Debugger:
- Create and initialize DebuggerInterface before passing it on to
TeamDebugger.
No functional change.
* There's no need to force the streamer plugin to use a
BMediaIO. This class is supplied to accomodate more smart uses,
but in certain cases it makes just things more complex. If a
plugin doesn't need to have an internal caching method, then it
will be simpler to implement a block-consuming BDataIO and let
the internal BMediaIOWrapper to deal with caching.
just noticed this crash...
when fConfigView gets deleted by selecting a translator it
deletes its child fInfoText but we were leaving the pointer
alone.
Afterwords if you changed the panel text color in Appearance
a message gets sent that checks to see if the fInfoView
pointer is NULL, and since it isn't, procedes to dereference
the pointer and *boom* the app crashes.
Fix this by setting the fInfoText pointer to NULL when fConfig
view gets deleted. That way when you change the panel text
color it doesn't attempt to dereference the stale pointer
and everything works as it should.
As you scroll through the list of translators keep the window width
constant by setting a minimum width. A little too narrow at 8pt,
and the window is too wide at 24pt, but at 12pt it is just right.
(at least for 1024x768).
The window width and height were not chosen arbitrarily, 598px
is just about 600px and almost exactly fits the width of our
widest translator (PNG translator). The height is 369px which comes
from the golden ratio of 1.62:1. The width of the translators are
set to exactly match this at 12pt font size. This way you don't get
any unexpected window resizing. At other font sizes the window does
resize, but, the contents still fit (mostly) nicely.
See screenshot for details:
http://insightfactory.tumblr.com/image/141980518317
* When a watched directory contains a mount point, we need to resolve
the actual parent directory of the mount point in the file system to
serve the monitor.
* Added a directory argument for notify_{stat/attribute}_changed().
* This allows to watch only a directory, and get the notifications for
all of its files, not just add/remove entry notifications.
As part of the refactoring that was done for app_server layer support,
the private shape_data struct was updated to derive from BReferenceable.
However, BShape's destructor was never updated to reflect this, and
consequently attempts to use a debug build of libbe would consistently
throw the user into the debugger due to BReferenceable's sanity check
against non-zero deletes that weren't on the stack.
It should be noted though that there are probably a few things that could
be factored out and/or simplified with that class in general, since e.g.
when copying its data from another shape_data instance, it uses C++ array
allocations, while when being manipulated by BShape directly, the latter
uses alloc/realloc/free.
NOTE: This should have no effect on the colors of these labels unless
you have changed the panel text color and control text colors to be
different. Both are black by default.
In the case of the menu field, spinner, check box, radio button,
slider, and text control labels we want to draw these labels using
the panel text color instead of the control text color because they
are drawn on top of the panel color. (the menu field label color was
changed in a previous commit in this push).
In all cases except the menu field the label color is specified by
temporarily unsetting the B_IS_CONTROL flag while drawing the label.
All use control look to draw the label.
The control text color is meant to be used for text INSIDE the control,
not the label text that accompanies the control -- at least that's the
way I understand it.
...instead of menu item text color when the label is unselected.
Menu item text color seems to make sense when the control is unselected
because we use selected menu item text color when the control is
selected, but, this isn't the case. We color the label background using
the menu item color because we are reproducing similar behavior of
BeOS R5. However, when the menu field is unselected the label needs to
draw so that it goes on the panel bg color.
ImageListView:
- Add columns for the respective start and end addresses of the text and data
segments of each image. Correspondingly, adjust the table model to return
the appropriate fields from the image's info. This can come in handy for
quickly determining the approximate location of an otherwise unknown memory
address, among other things.
DwarfImageDebugInfo:
- When resolving the address of a PIC function that a value was
returned by, check if the resulting address actually belongs to
the same image as the caller. If not, find the appropriate image
for the new address. Combined with the previous commits, this fixes
the issue that functions called indirectly by PLT entry that jumped
to another image entirely wouldn't be mapped back to their
corresponding FunctionDebugInfo instance, and thus would be skipped
since we couldn't determine a type to associate the return value with.
ThreadHandler:
- When stepping over a function call, ensure that we actually have a valid
value for the stepped over function address before adding a return value
info entry. While this had no visible adverse effect, it did result in
unnecessary work when creating the list of variables to display later,
since such entries would have no valid function to resolve to, and thus
had to be ignored/thrown away.
DisassemblerX86{64}:
- Fix problematic usage of udis86 that was broken during an update.
Rather than calling the appropriate udis86 function to retrieve the
operand, we were accessing it directly on the ud struct, which was
fully filled in implicitly in previous versions of the library. However,
in the updated version of udis86, the operands are only lazily decoded on
request, and as such this data was invalid, leading to us not resolving
target addresses properly. This primarily affected determining the location
of return values.
ExpressionEvaluationWindow:
- Add team listener hooks for the various thread state changes.
- Implement these to react accordingly and keep the thread/frame menus
up to date with running program changes, whether due to user interaction
in the main team window, or background activities of the debugged app.
Previously the evaluation window needed to be closed and reopened to
refresh these appropriately.
* "ht" and "-ht" enable or disable the use of HT mode
(high throughput, 802.11n) for the wireless network device
* Analogous to the option with the same name in FreeBSD's ifconfig
* Disabling HT before associating with an AP is a workaround for
connection instability issues encountered with iprowifi4965
driver
...and rename fBitmap to fOffscreenBitmap to make it more clear what it is.
We don't need to save a pointer to both the offscreen bitmap and
the offscreen view, just the bitmap. We can access the view by calling
fOffscreenBitmap->ChildAt((int32)0). This gives us back a _reserved private
variable slot.
In the (unlikely) case that _InitData() is called with offscreen = false but
the fOffscreenBitmap is not NULL, delete fOffscreenBitmap before
setting it to NULL so that memory is not leaked.
App Server sends each window a message that the screen has changed:
https://www.haiku-os.org/legacy-docs/bebook/BWindow.html#BWindow_ScreenChanged
Propegate B_SCREEN_CHANGED message to all child views first
Tell BColorControl to read the B_SCREEN_CHANGED message and reinitialize itself.
* Only reinit if switching to or from B_CMAP8
* Initialize all pointers to NULL in constructor
* Don't destroy and rebuild offscreen view (and text views) on reinit
* Reinitialize offscreen view on reinit.
Fixes#8035
Also initialzing the pointers to NULL in constructor fixes#12673
...instead of doubleBuffered for the flag that specifies whether or not to
draw using an offscreen buffer.
Also remove the (not currently used) text from the docs since the parameter
is being used.
* Use print format macros to fix the 64 bit build.
* Correct a typo in the shift of the trigger mode definition. As the
value is 0 either way, this does not make a functional difference.
* Use macros instead of values in comparisons.
This allows usb_ecm to work in case it is part of a device using
different configurations for different types of interfaces and ECM is
not the first configuration.
While the USB descriptors are specifically built in such a way that it's
always possible to correctly query the max packet size, some devices
unfortunatley use bogus values in their descriptors and rely on the
stack to use the mandated values.
This fixes USB devices in VirtualBox when EHCI emulation is used. This
really is a bug in their descriptor emulation though.
Don't initialize the current qtd field with the terminate bit as it does
not exist in this field. While the lower 5 bits are documented as being
ignored anyway, this is more correct. Should cause no functional change.
* Move current_mode into the accelerant as the
driver doesn't care.
* Record panel_mode in driver and present to accelerant
* eDP, if no EDID and mobile, leave edid incomplete.
Mode set should notice that and fall back to panel_mode
Now if you start LegacyPackageInstaller with no filenames passed, you get
the "installed packages" window, from which you can uninstall stuff.
Fixes#10612.
Approximation for n >= 1000
Factorial
Actual Value (truncated)
Approximation
1000!
4.0238726007709377354370243392300398571937E2567
4.0238726007709377354370243392307 E2567
10000!
2.8462596809170545189064132121198688901480E35659
2.8462596809170545189064132121197 E35659
100000!
2.824229407960347874293421578024535518477E456573
2.824229407960347874293421578024 E456573
Close enough!
* If the input is a terminal rather than a file or pipe, only then look
for the single period on a line as end of text. Also look for end of
file as an end of the text, so that piped in text works.
* Parse multiple e-mail addresses properly, adding a comma between them
(a space doesn't work). Also allow mixing of "to" e-mail addresses
and command line switches, previously all "to" addresses had to be
at the end.
* Fewer blank lines in the output, make it look nicer, remove things
like a redundant display of the body text before text was read. Also
no output text when just piping in a message.
* Avoid buffer overrun by using fgets instead of gets.
* Use stderr for text the user likely doesn't want to save, and for
prompts that would be invisible if stdout was redirected to a file.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
- Termios: cf{get,set}{i,o}speed can handle arbitrary speed values.
- The value is stored in the appropriate fields of the termios structure
in this case. The old constants (stored in the flags) are preserved
for BeOS binary compatibility.
- Adjust the FTDI FT232* driver to accept custom rates, by replacing the
hardcoded regster values with a function that will compute it
according to FTDI documentation (confirmed giving the same values for
the existing baudrates).
Currently only applies when in a window, not when replicated
(then it always switches).
Feel free to fix (need to create the settings object when replicated).