1.\" $MirOS: src/lib/libc/stdlib/rpmatch.3,v 1.2 2009/12/20 15:56:44 tg Exp $ 2.\"- 3.\" Copyright (c) 2007 4.\" Thorsten Glaser <tg@mirbsd.de> 5.\" 6.\" Provided that these terms and disclaimer and all copyright notices 7.\" are retained or reproduced in an accompanying document, permission 8.\" is granted to deal in this work without restriction, including un- 9.\" limited rights to use, publicly perform, distribute, sell, modify, 10.\" merge, give away, or sublicence. 11.\" 12.\" This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to 13.\" the utmost extent permitted by applicable law, neither express nor 14.\" implied; without malicious intent or gross negligence. In no event 15.\" may a licensor, author or contributor be held liable for indirect, 16.\" direct, other damage, loss, or other issues arising in any way out 17.\" of dealing in the work, even if advised of the possibility of such 18.\" damage or existence of a defect, except proven that it results out 19.\" of said person's immediate fault when using the work as intended. 20.\"- 21.Dd $Mdocdate: December 20 2009 $ 22.Dt RPMATCH 3 23.Os GNU 24.Sh NAME 25.Nm rpmatch 26.Nd check user input for confirmation 27.Sh SYNOPSIS 28.Fd #define _SVID_SOURCE 29.Fd #include <stdlib.h> 30.Ft int 31.Fn rpmatch "const char *response" 32.Sh DESCRIPTION 33The 34.Fn rpmatch 35function is a GNU extension and should not be used in new code. 36It is only implemented in 37.Mx 38for compatibility reasons. 39It basically checks if the 40.Fa response 41string begins with 42.Dq Y 43or 44.Dq y , 45returning 1, or 46.Dq N 47or 48.Dq n , 49returning 0; returning -1 otherwise. 50.Sh HISTORY 51The 52.Fn rpmatch 53function was first introduced to BSD in 54.Mx 10 . 55