Sponsored Content
Top Forums Programming help with atoi and macros in C Post 302509106 by vistastar on Tuesday 29th of March 2011 10:33:54 PM
Old 03-29-2011
htons() receives a unsigned short integer type.
You should use htonl(), which recieves unsigned long integer type.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

troff macros

Hi, I'm going write a small handbook. The typesetting software I'm going to use is troff. There are -ms -me -mm macros for troff. Which one is the most suitable? Thanks! -Tony (2 Replies)
Discussion started by: tonyt
2 Replies

2. Programming

atoi

i know what is the use of atoi function.... converts string to int. but whenever i use that it gives me 0.... could any one help in this issue.. eg. int i; char str; str="name"; i=atoi(str); i gives me 0. why? (3 Replies)
Discussion started by: bankpro
3 Replies

3. UNIX for Dummies Questions & Answers

saving macros for VIM

The question is , as the topic says, how does one save macros for VIM in the .vimrc. I had a look on web and it gave all this ****** about how to build turing machines in vim code or something but i just want to store a macro to like : if(){ } I know how to do it IN vim but .vimrc??????!?!?!... (3 Replies)
Discussion started by: yngwie
3 Replies

4. Programming

How do capability macros get named?

The following is taken from some production code: #ifdef LOCK_LOCKF #ifdef HAVE_SYS_FILE_H #include <sys/lockf.h> #endif #ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif #define LOCK(file) fseek(file, 0L, 0), lockf(file, 1, 0L) #define UNLOCK(file) fseek(file, 0L, 0),... (2 Replies)
Discussion started by: frequency8
2 Replies

5. Programming

One last question about capability macros

This might be poorly worded. In the header file, I have #ifdef LOCK_FCNTL #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #define LOCK(file) setlock(fileno(file), F_WRLCK); #define UNLOCK(file) setlock(fileno(file), F_UNLCK); #endif /* LOCK_FCNTL */ #ifdef LOCK_FLOCK #ifdef... (1 Reply)
Discussion started by: frequency8
1 Replies

6. Shell Programming and Scripting

Expect Terminal Macros

Hey people! I just started out working at an ISP as tech support and thought that I should ease the work load by scripting some small macros. I create different commands with Alias through .bashrc which are all directed to the same script file. Here I planned on using Expect to run different... (0 Replies)
Discussion started by: GhettoFish
0 Replies

7. Linux

What are the meaning of these macros..

Masters, I am trying to learn the serial mouse driver for linux kernel. On the kernel source tree I find out these macros and I am unable to find out the meaning of these macros. Please anyone help me to understand these. These macros are defined in linux/serio.h... (2 Replies)
Discussion started by: iamjayanth
2 Replies

8. UNIX for Advanced & Expert Users

Using Macros in sftp command

Hi, I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file. I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error. Is there any other alternative? Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies

9. Shell Programming and Scripting

Macros how-to?

Hi, all I just came to new system with RH, and it has alot of macros I was told to use, but I can't find how to open it for display or for edit, can you help me please, is it all about make/makefile? let say I have macro <trx> like this, that does a lot of things: >$ trx ... creating new... (1 Reply)
Discussion started by: trento17
1 Replies

10. Programming

type conversion C, atoi()

In the book "The C programming language"; second edition, chapter 2.7 there is a snippet which is supposed to: "convert a string of digits into its numeric equivalent". int atoi(char s) { int i, n; n = 0; for ( i = 0; s >= '0' && s <= '9'; ++i) n = 10 * n + (s -... (4 Replies)
Discussion started by: tornow
4 Replies
DESMUME(1)						      General Commands Manual							DESMUME(1)

NAME
desmume-cli - Nintendo DS emulator SYNOPSIS
desmume-cli [options] files... DESCRIPTION
This manual page documents briefly the desmume-cli program desmume is a Nintendo DS emulator running homebrew demos and commercial games. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --load-slot=NUM Loads savegame from slot NUM --disable-sound Disables the sound emulation --disable-limiter Disables the 60 fps limiter --3d-engine=ENGINE Select available 3d emulation: 0 = 3d disabled 1 = internal desmume software rasterizer (default) --opengl-2d Enables using OpenGL for screen rendering --soft-convert Use software colour conversion during OpenGL screen rendering. May produce better or worse frame rates depending on hardware. --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port --save-type=TYPE Select savetype from the following: 0 = Autodetect 1 = EEPROM 4kbit 2 = EEPROM 64kbit 3 = EEPROM 512kbit 4 = FRAM 256kbit 5 = FLASH 2mbit 6 = FLASH 4mbit --fwlang=LANG Set the language in the firmware, LANG as follows: 0 = Japanese 1 = English 2 = French 3 = German 4 = Italian 5 = Spanish --cflash=PATH_TO_DISK_IMAGE Enable disk image GBAMP compact flash emulation --help Show summary of options. --version Show version of program. Some options may be unavailable, depending on compile-time configuration, for instance gdb stubs and opengl. INPUT
Mouse cursor acts as stylus, mouse click replaces stylus touch. Keyboard is configured as follows: F1-F10 load savegame from slot 1-10 Shift+F1-F10 save game to slot 1-10 Non-keypad arrows act as d-pad z = A x = B a = Y s = X q = L w = R Enter = START Left Shift = SELECT AUTHOR
desmume was written by DeSmuME team (http://sourceforge.net/projects/desmume). This manual page was written by Pascal Giard <pascal@debian.org>, for the Debian project (but may be used by others). June 26, 2007 DESMUME(1)
All times are GMT -4. The time now is 05:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy