Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmlistreplacepositions(3x) [osf1 man page]

XmListReplacePositions(3X)												XmListReplacePositions(3X)

NAME
XmListReplacePositions - A List function that replaces items in a list based on position SYNOPSIS
#include <Xm/List.h> void XmListReplacePositions (widget, position_list, item_list, item_count) Widget widget; int *position_list; XmString *item_list; int item_count; DESCRIPTION
XmListReplacePositions replaces noncontiguous items in a list. The item at each position specified in position_list is replaced with the corresponding entry in item_list. When the items are inserted into the list, they are compared with the current XmNselectedItems list. Any of the new items that match items on the selected list appears selected. A warning message is displayed if a specified position is invalid; that is, the value is 0, a negative integer, or a number greater than the number of items in the list. Specifies the ID of the List widget. Specifies an array of the positions of items to be replaced. The position of the first item in the list is 1; the position of the second item is 2; and so on. Specifies an array of the replacement items. Specifies the number of elements in position_list and item_list. This number must be non-negative. For a complete definition of List and its associated resources, see XmList(3X). SEE ALSO
XmList(3X) XmListReplacePositions(3X)

Check Out this Related Man Page

XmListReplaceItemsPosUnselected(library call)							     XmListReplaceItemsPosUnselected(library call)

NAME
XmListReplaceItemsPosUnselected -- A List function that replaces items in a list without selecting the replacement items SYNOPSIS
#include <Xm/List.h> void XmListReplaceItemsPosUnselected( Widget widget, XmString *new_items, int item_count, int position); DESCRIPTION
XmListReplaceItemsPosUnselected replaces the specified number of items in the list with new items, starting at the given position. The replacement items remain unselected, even if they currently appear in the XmNselectedItems list. widget Specifies the ID of the List widget to replace items in. new_items Specifies a pointer to the replacement items. item_count Specifies the number of elements in new_items and the number of items in the list to replace. This number must be nonnegative. position Specifies the position of the first item in the list to be replaced. A value of 1 indicates that the first item replaced is the first item in the list; a value of 2 indicates that it is the second item; and so on. Beginning with the item specified in position, item_count items in the list are replaced with the corresponding elements from new_items. That is, the item at position is replaced with the first element of new_items; the item after position is replaced with the second element of new_items; and so on, until item_count is reached. For a complete definition of List and its associated resources, see XmList(3). RELATED
XmList(3). XmListReplaceItemsPosUnselected(library call)
Man Page

14 More Discussions You Might Find Interesting

1. Programming

enumeration types in C

If I want to declare an array of structures in C and have the number of items in that array to correspond to the items of an enumeration, is there a way to access the maximum value in the enumeration when declaring the array? For instance: typedef struct { various fields.... } ... (3 Replies)
Discussion started by: cleopard
3 Replies

2. UNIX for Dummies Questions & Answers

append data to file

i want to develop a script newdata that writes new data to a file called items the file items has the following headings columns separated by tabs: channel date time programe if i type executable file newdata on the command line with parameters, it should append it to the items files the... (1 Reply)
Discussion started by: fletcher
1 Replies

3. Shell Programming and Scripting

Plain Text List to HTML List

Hello, I am trying to take a simple list (from echo, not a file) and turn it into a list with HTML codes. List item one. List item two. List item three. to <ol> <li>List item one.</li> <li>List item two.</li> <li>List item three.</li> </ol> The list is coming in via echo on... (4 Replies)
Discussion started by: QuestunAthority
4 Replies

4. Shell Programming and Scripting

Compare 2 files

HI I have a list of items in 2 files. Some items are present in both the files in any order. Say for example item name is 'apple', it may be present in line 2 of file 1 and line 10 of file 2. I want to see the missing items only. In simple terms, Items present in file1 if not in file2 then... (5 Replies)
Discussion started by: PrasannaKS
5 Replies

5. Shell Programming and Scripting

Menu driven Script needed ..pls help

Hi Guys.. am new to unix scrpiting..I need a Menu need to create using shell scrpting eg: Food items ready paid if i press "f" need to add items for a file food items.. if i press "r" it need to move into ready and remove from food items if i press "p" need to update a filed in... (1 Reply)
Discussion started by: sasdua
1 Replies

6. Shell Programming and Scripting

Sed -f alternatives?

I have a list of items (control file) that I want to substitute in a text file, and it's BIG. The file has two items, the original, and the new: A B B C D E The file has something like 10,000 entries. So in the oldfile.txt, I'd like to basically make all these expression matched... (9 Replies)
Discussion started by: twoblink
9 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Delete files with condition

I have a directory containing thousands of items “video files”, these items were generated by an application, which generates two items with the same name but with different extensions “.avi and .mp4”. There was a tool in my application to remove one item @ a time. Later I found this tool removes... (5 Replies)
Discussion started by: awadeid
5 Replies

8. Shell Programming and Scripting

How can I set up this loop?

I want to compare two files. I think using grep is the way to go but I do not know how to set this up. Let me show an example: File1 has 1000 items, File2 has 700 items I need to take the first item in File1 and search the entire contents of File2 to see if there is a match there. IF there is a... (3 Replies)
Discussion started by: castrojc
3 Replies

9. UNIX for Dummies Questions & Answers

Array question

I have attempted to create an array consisting of two items: #0 and #1. I am able to print the two items corrctly: arr=(hello "my name is") echo ${arr} hello echo ${arr} my name is However, when I try to run a for loop to print both objects: for i in ${arr } do echo $i done I get:... (2 Replies)
Discussion started by: locoroco
2 Replies

10. Shell Programming and Scripting

Associative Array with more than one item per entry

Hi all I have a problem where i have a large list ( up to 1000 of items) and need to have 2 items pulled from it into variables in a bash script my list is like the following and I could have it as an array or possibly an external text file maintained separately. Every line is different and... (6 Replies)
Discussion started by: kcpoole
6 Replies

11. Web Development

List items not arranged as expected on web page

greetings, i have a list of items that are picks to be arranged within a row that is 22 in height. this "plugin" looks fine in the old installation but after installing a new version of the web app and dropping this "plugin" in place the layout isn't as i expect. they are arranged vertically... (1 Reply)
Discussion started by: crimso
1 Replies

12. Shell Programming and Scripting

Parsing through a list of items

Hi there, Here is my checklist of items, 4.1.1 Alerter 4.1.2 Client Services for Netware 4.1.3 Clipbook 4.1.4 Fax Service 4.1.5 File Replication 4.1.6 File Services for Macintosh 4.1.7 FTP Publishing Service 4.1.8 Help and Support 4.1.9 HTTP SSL 4.1.10 IIS Admin Service ... (1 Reply)
Discussion started by: alvinoo
1 Replies

13. Shell Programming and Scripting

sed to delete items in an array from a file

I need to create a shell script to delete multiple items (Strings) at a time from a file. I need to iterate through a list of strings. My plan is to create an array and then iterate through the array. My code is not working #!/bin/bash -x declare -a array=(one, two, three, four)... (5 Replies)
Discussion started by: bash_in_my_head
5 Replies

14. Shell Programming and Scripting

Removing duplicate items from an array

Hello Experts, I am trying to write a shell script to find duplicate items in an array, this is what i have tried : #!/bin/bash echo "This is another sample Progg to remove duplicate items from an array" echo "How many number do you want to insert" read n for (( i=0; i<$n; i++ )) do ... (5 Replies)
Discussion started by: mukulverma2408
5 Replies