Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

append_filename(3alleg4) [v7 man page]

append_filename(3alleg4)					  Allegro manual					  append_filename(3alleg4)

NAME
append_filename - Concatenates a filename to a path. Allegro game programming library. SYNOPSIS
#include <allegro.h> char *append_filename(char *dest, const char *path, const char *filename, int size); DESCRIPTION
Concatenates the specified filename onto the end of the specified path, storing at most `size' bytes into the `dest' buffer. If `path' doesn't have a trailing path separator, the function will append one if needed. You can use the same buffer both as input and output because Allegro internally works on a copy of the input before touching `dest'. Example: append_filename(buf, "/home/user", "prog.bin", sizeof(buf)); RETURN VALUE
Returns a copy of the `dest' parameter. SEE ALSO
replace_filename(3alleg4) Allegro version 4.4.2 append_filename(3alleg4)

Check Out this Related Man Page

canonicalize_filename(3alleg4)					  Allegro manual				    canonicalize_filename(3alleg4)

NAME
canonicalize_filename - Converts any filename into its canonical form. Allegro game programming library. SYNOPSIS
#include <allegro.h> char *canonicalize_filename(char *dest, const char *filename, int size); DESCRIPTION
Converts any filename into its canonical form, i.e. the minimal absolute filename describing the same file and fixing incorrect for- ward/backward slashes for the current platform, storing at most `size' bytes into the `dest' buffer. You can use the same buffer both as input and output because Allegro internally works on a copy of the input before touching `dest'. Example: char buf[256]; ... canonicalize_filename(buf, "~/../s22/..\t3st///hi.c", sizeof(buf)); /* Running this under Unix would return: /home/t3st/hi.c */ Note that this function won't work as expected if the path to canonicalize comes from another platform (eg. a "c:something" path will canonicalize into something really wrong under Unix: "/current/path/c:/something"). RETURN VALUE
Returns a copy of the `dest' parameter. SEE ALSO
fix_filename_case(3alleg4), fix_filename_slashes(3alleg4) Allegro version 4.4.2 canonicalize_filename(3alleg4)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Append filename to datafile

I am working on an shell script which checks for all the file starting with abc*.* and if file found then the filelines need to append the file name in begining can some one help with the filename appending... for i in `ls $filename*.csv` do echo $i --- NEED to append file name befor... (3 Replies)
Discussion started by: Satyagiri
3 Replies

2. Shell Programming and Scripting

Formatting the text file using shell script

How to add the filename to end of each line with | as seperator, except first and last line of the file(s) in directories(with diff tree structure) using shell script?. And also how to replace a list of strings with another set of strings, which is present in a file?. Kindly help out on... (1 Reply)
Discussion started by: av_vinay
1 Replies

3. UNIX for Dummies Questions & Answers

Shell Scripts - Append a filename with date and time....

Hello, I need to create a shell script that appends a filename to create a name with the date and time appended that is guaranteed to not exist. That is, the script insures you will not overwrite a file with the same name. I am lost with this one. I know I need to use date but after that I am... (3 Replies)
Discussion started by: citizencro
3 Replies

4. Shell Programming and Scripting

How to append filename to rows in gzip stdout

Assume I have 2 gz files with 2 lines each as below a.gz a1,a a2,a b.gz b1,b b2,b If I issue gzip -d -c *.gz I will get below in the stdout a1,a a2,a b1,b b2,b What I need it the filename appended to each row either at the front or back. a.gz,a1,a a.gz,a2,a (2 Replies)
Discussion started by: ericlim
2 Replies