summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/04_7.c
blob: 9116633f1d8a180cb4c27b7f1effcf9b0abff08f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
char  line[100];   /* input line from console */
int   value;       /* a value to double */

main()
{
    (void) printf("Enter a value: ");
    (void) fgets(line, sizeof(line), stdin);
    (void) sscanf(line, "%d", &value);
    (void) printf("Twice %d is %d\n",
                  value, value * 2);
    return (0);
}
t'>2016-05-17 16:13:00 -0700 committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-17 16:13:00 -0700 commitb80fed9595513384424cd141923c9161c4b5021b (patch) treea7ca08c40a41f157f3cb472b9bc7cfc123859d8d /Documentation/input parent24b9f0cf00c8e8df29a4ddfec8c139ad62753113 (diff)parent202bae52934d4eb79ffaebf49f49b1cc64d8e40b (diff)
Merge tag 'dm-4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper updates from Mike Snitzer: - based on Jens' 'for-4.7/core' to have DM thinp's discard support use bio_inc_remaining() and the block core's new async __blkdev_issue_discard() interface - make DM multipath's fast code-paths lockless, using lockless_deference, to significantly improve large NUMA performance when using blk-mq. The m->lock spinlock contention was a serious bottleneck. - a few other small code cleanups and Documentation fixes * tag 'dm-4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: unroll issue_discard() to create longer discard bio chains dm thin: use __blkdev_issue_discard for async discard support dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining() dm raid: make sure no feature flags are set in metadata dm ioctl: drop use of __GFP_REPEAT in copy_params()'s __vmalloc() call dm stats: fix spelling mistake in Documentation dm cache: update cache-policies.txt now that mq is an alias for smq dm mpath: eliminate use of spinlock in IO fast-paths dm mpath: move trigger_event member to the end of 'struct multipath' dm mpath: use atomic_t for counting members of 'struct multipath' dm mpath: switch to using bitops for state flags dm thin: Remove return statement from void function dm: remove unused mapped_device argument from free_tio()
Diffstat (limited to 'Documentation/input')