devd.cc (247762) | devd.cc (247763) |
---|---|
1/*- 2 * Copyright (c) 2002-2010 M. Warner Losh. 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 --- 49 unchanged lines hidden (view full) --- 58 */ 59 60// TODO list: 61// o devd.conf and devd man pages need a lot of help: 62// - devd needs to document the unix domain socket 63// - devd.conf needs more details on the supported statements. 64 65#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2010 M. Warner Losh. 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 --- 49 unchanged lines hidden (view full) --- 58 */ 59 60// TODO list: 61// o devd.conf and devd man pages need a lot of help: 62// - devd needs to document the unix domain socket 63// - devd.conf needs more details on the supported statements. 64 65#include <sys/cdefs.h> |
66__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 247762 2013-03-04 02:21:29Z eadler $"); | 66__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 247763 2013-03-04 02:21:31Z eadler $"); |
67 68#include <sys/param.h> 69#include <sys/socket.h> 70#include <sys/stat.h> 71#include <sys/sysctl.h> 72#include <sys/types.h> 73#include <sys/wait.h> 74#include <sys/un.h> --- 526 unchanged lines hidden (view full) --- 601 count--; 602 else if (*src == '(') 603 count++; 604 dst += *src++; 605 } 606 return; 607 } 608 | 67 68#include <sys/param.h> 69#include <sys/socket.h> 70#include <sys/stat.h> 71#include <sys/sysctl.h> 72#include <sys/types.h> 73#include <sys/wait.h> 74#include <sys/un.h> --- 526 unchanged lines hidden (view full) --- 601 count--; 602 else if (*src == '(') 603 count++; 604 dst += *src++; 605 } 606 return; 607 } 608 |
609 // ${^A-Za-z] -> $\1 | 609 // $[^A-Za-z] -> $\1 |
610 if (!isalpha(*src)) { 611 dst += '$'; 612 dst += *src++; 613 return; 614 } 615 616 // $var -> replace with value 617 do { --- 530 unchanged lines hidden --- | 610 if (!isalpha(*src)) { 611 dst += '$'; 612 dst += *src++; 613 return; 614 } 615 616 // $var -> replace with value 617 do { --- 530 unchanged lines hidden --- |