fputws.c (24990dfad088db7073e30b8870d62366fb510cd3) | fputws.c (7591ae56aeeefc978363f92d208d5e1140090f96) |
---|---|
1/*- 2 * Copyright (c) 2002 Tim J. Robbins. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#include "un-namespace.h" 35#include "libc_private.h" 36#include "local.h" 37 38int 39fputws(const wchar_t * __restrict ws, FILE * __restrict fp) 40{ 41 | 1/*- 2 * Copyright (c) 2002 Tim J. Robbins. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#include "un-namespace.h" 35#include "libc_private.h" 36#include "local.h" 37 38int 39fputws(const wchar_t * __restrict ws, FILE * __restrict fp) 40{ 41 |
42 ORIENTLOCK(fp, 1); 43 | 42 FLOCKFILE(fp); 43 ORIENT(fp, 1); |
44 /* XXX Inefficient */ 45 while (*ws != '\0') | 44 /* XXX Inefficient */ 45 while (*ws != '\0') |
46 if (fputwc(*ws++, fp) == WEOF) | 46 if (__fputwc(*ws++, fp) == WEOF) { 47 FUNLOCKFILE(fp); |
47 return (-1); | 48 return (-1); |
49 } 50 FUNLOCKFILE(fp); |
|
48 49 return (0); 50} | 51 52 return (0); 53} |