Sponsored Content
Full Discussion: Readline programming
Top Forums Programming Readline programming Post 302521737 by pludi on Thursday 12th of May 2011 06:14:11 AM
Old 05-12-2011
Again, the completion suggestions are done by the shell, not the application. Your application isn't even loaded at that point, and thus has no way of telling the shell what options are available. The readline library would only be of interest if you want that functionality inside your application (like GDB when used interactive), and even then you'd have to extend the functionality yourself.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

2. Shell Programming and Scripting

cat vs head vs readline get variable from txt file

I have a file with a single filename in it, which I want to assign to a BASH variable, so I've been trying: c=$(head -1 somefile) echo $c which outputs correctly, but them when I do ... somecommand $c it says it can't find the file, is that because it's grabbing the whole line, and... (5 Replies)
Discussion started by: unclecameron
5 Replies

3. Programming

Readline problems

I'm having problems with libreadline. When I write text longer than the current line, the text wraps back to the beginning of the line rather than to the next line. Also, when I use the arrow keys to edit something in that beginning part, it won't display at all (so I can edit only if I remember... (5 Replies)
Discussion started by: CRGreathouse
5 Replies

4. Programming

C Programming - Hardware Programming

Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code. Please provide me any book name or any URL so that I can get an exhaustive knowledge over it. If possible please give me some tips on interacting with hardwares directly through... (3 Replies)
Discussion started by: nandumishra
3 Replies

5. Shell Programming and Scripting

Readline Formatting

Hi All, I have a function that loops through an XML file line by line and spits it the content out to a new file (sometimes certain lines need changing). This all works fine, however the formatting of the original XML is not kept. for example:- <?xml version="1.0"?> <mysqldump>... (3 Replies)
Discussion started by: robfwauk
3 Replies

6. Programming

Error:readline() on closed filehandle Perl

Hi, i have run the below perl code and i am getting an error Error:readline() on closed filehandle OR at run.pl line 31. CODE: =========================================== open OR,$ARGV; while (<OR>) { # find the batch date next if length $_ < 3; # BLANK LINE # last if $. > 120; #... (3 Replies)
Discussion started by: pspriyanka
3 Replies

7. Shell Programming and Scripting

using readline with parameter

dear all, i have code shell like this but i want to using parameter for this shell how i can do that :ex ./sample.sh 100 500sample.sh START=${1} LAST=${2} for (( a=${START}; a<=${LAST}; a++ )) do { echo $a } donethx for your advice (5 Replies)
Discussion started by: zvtral
5 Replies

8. Shell Programming and Scripting

How do I get my shell back to normal readline?

I just ran an application that crashed... but before it did, it managed to set readline echo off, and probably a bunch of other settings. Is there any way I can just tell my shell to re-initialize? To get back to whatever state existed before my shell got messed up by this evil program? (2 Replies)
Discussion started by: jjinno
2 Replies

9. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies

10. Programming

Trouble compiling program using the readline library.

Hi: in the info page for readline library I read -- Function: void rl_variable_dumper (int readable) Print the readline variable names and their current values to `rl_outstream'. If READABLE is non-zero, the list is formatted in such a way that it can be made part of an... (1 Reply)
Discussion started by: stf92
1 Replies
TclXInit(3tclx) 														   TclXInit(3tclx)

NAME
Tclx_Init, Tclxcmd_Init, TclX_Main, Tkx_Init, TkX_Main - Extended Tcl initialization. SYNOPSIS
-ltclx -ltcl #include "tclExtend.h" int Tclx_Init (Tcl_Interp *interp); int Tclxcmd_Init (Tcl_Interp *interp); int void TclX_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); int Tkx_Init (Tcl_Interp *interp); void TkX_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); void TclX_SetAppInfo (int defaultValues, char *appName, char *appLongName, char *appVersion, int appPatchlevel); DESCRIPTION
These functions are used to initialize Extended Tcl and applications based on Extended Tcl. This manual page also discusses various issues and approaches of integrating TclX into other applications. Tclx_Init Initializes Extended Tcl, adding the extended command set to the interpreter. This is called from Tcl_AppInit. This function must be called after the Tcl_Init function. In addition to the standard command set, it enables use of tlib packages libraries and makes the stan- dard TclX library available. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. Tclxcmd_Init Add the TclX command set to the interpreter, with the exception of the TclX library management commands. This is normally called by Tclx_Init and should only be used if you don't want the TclX library handling. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. TclX_Main This function parses the command line according to the TclX shell specification (Unix shell compatible). It creates an interpreter and calls the specified function appInitProc to initialize any application specific commands. It then either evaluates the command of script specified on the command line or enters an interactive command loop. This procedure never returns, it exits the process when it's done. Using the TclX shell also gives you SIGINT handling in interactive shells. Tkx_Init Initializes Extended Tcl Tk environment. This is called from Tcl_AppInit after the Tk_Init function. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. TkX_Main This function parses the command line according to the wish shell specification. It creates an interpreter and calls the specified func- tion appInitProc to initialize any application specific commands. It then either evaluates the command of script specified on the command line or enters an interactive command loop. This procedure never returns, it exits the process when it's done. Using the TclX wish shell gives you SIGINT handling in interactive shells, otherwise it is identical to standard wish. TclX_SetAppInfo Store the application information returned by infox. Parameters o defaultValues - If true, then the values are assigned only if they are not already defined (defaulted). If false, the values are always set. o appName - Application symbolic name. o appLongName - Long, natural language application name. o appVersion - Version number of the application. o appPatchlevel - Patch level of the application. If less than zero, don't change. String pointers are saved without copying, don't release the memory. If the arguments are NULL, don't change the values. DYNAMIC LOADING OF TCLX
TclX can be dynamically loaded on systems that support shared libraries and the load command. This can be done using either the load or the package require commands. If package require is to be used, a pkgIndex,tcl must be constructed. The pkg_mkIndex does not generate a pkgIndex.tcl file that works with TclX. Instead a command similar to package ifneeded Tclx 7.5.0 "load $dir/libtclx.so" should be placed in the directory containing the TclX shared library. A prototype pkgIndex,tcl file is build by TclX and is installed in the run time directory under the name pkgIndex,proto. This file can't be used as-is, but should be renamed and copied or combined with an existing pkgIndex,tcl in the directory containing the shared library. There is no need to dynamically load libtkx.so, since it only contains support for wishx. INTEGRATING TCLX WITH OTHER EXTENSIONS AND APPLICATIONS
The main aspects to integrating TclX with into an application is to decide if the application is based on the standard Tcl/Tk shells or the TclX shells. If the standard shells are desired, then all that is necessary is to call Tclx_Init after Tcl_Init and Tkx_Init after Tk_Init. This functionality may also be dynamically loaded. To get the TclX shell in a Tcl only application, with the tcl command functionality, call TclX_Main from the main function instead of Tcl_Main. This shell has arguments conforming to other Unix shells and SIGINT signal handling when interactive,. To get the Tclx shell in a Tk application, with the wishx command functionality, call TkX_Main from the main function instead of Tk_Main. This shell has SIGINT signal handling when interactive, Tcl TclXInit(3tclx)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy