From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 28 Nov 2007 20:56:33 +0300 From: Alexey Tourbin To: ALT Linux Team development discussions Message-ID: <20071128175633.GU361@solemn.turbinal> Mail-Followup-To: ALT Linux Team development discussions References: <20071125211632.GC30421@basalt.office.altlinux.org> <20071126085538.GB13915@mw.local.seiros.ru> <474C3898.6090500@sandy.ru> <20071127154518.GM11953@basalt.office.altlinux.org> <75e139a00711272256i770bd25ci550debea6f99b693@mail.gmail.com> <474D2CED.30401@sandy.ru> <474D3678.508@altlinux.org> <20071128095531.GM361@solemn.turbinal> <474D52E3.9030808@altlinux.org> <20071128163518.GR361@solemn.turbinal> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hN1XGyM8GoU8K2XL" Content-Disposition: inline In-Reply-To: <20071128163518.GR361@solemn.turbinal> Subject: [devel] =?koi8-r?b?y8/Oy8HUxc7Bw8nRINPU0s/L?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 18:08:30 -0000 Archived-At: List-Archive: List-Post: --hN1XGyM8GoU8K2XL Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 28, 2007 at 07:35:18PM +0300, Alexey Tourbin wrote: > > > UINT4 rc_map2id(char *name) > > > { =20 > > > struct map2id_s *p; > > > char ttyname[PATH_MAX]; > > >=20 > > > *ttyname =3D '\0'; > > > if (*name !=3D '/') > > > strcpy(ttyname, "/dev/"); > > > =20 > > > strncat(ttyname, name, sizeof(ttyname)); > > > =20 > > > for(p =3D map2id_list; p; p =3D p->next) > > > if (!strcmp(ttyname, p->name)) return p->id; > > > =20 > > > warn("rc_map2id: can't find tty %s in map database", ttyname); > > > =20 > > > return 0;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=C5=D4=C1=C8 =D7 =D2=C5=D0=CF=DA=C9=D4=C1=D2= =C9=C9. =F2=C5=DE=D8 =C9=C4=A3=D4 =CF apt-0.5.15lorg2-alt-genpkglist-reqfiles.patch. =F7=CF=D4 =CD=CF=CA =D7=C1=D2=C9=C1=CE=D4 "=DC=C6=C6=C5=CB=D4=C9=D7=CE=CF= =CA" =CB=CF=CE=CB=C1=D4=C5=CE=C1=C3=C9=C9 =D3=D4=D2=CF=CB =D7 =D5=D3=CC=CF= =D7=C9=D1=C8 =D3=D5=D2=CF=D7=CF=CA =CE=C5=CF=C2=C8=CF=C4=C9=CD=CF=D3=D4=C9. +static +bool isRequiredPath(const char *dir, const char *basename) +{ + char fullname[strlen(dir) + strlen(basename) + 1]; + strcpy(fullname, dir); + strcat(fullname, basename); + if (reqfiles.find(fullname) !=3D reqfiles.end()) + return true; + return false; +} =FA=C4=C5=D3=D8 =C9=D3=D0=CF=CC=D8=DA=D5=C5=D4=D3=D1 =CE=C5=D3=D4=C1=CE=C4= =C1=D2=D4=CE=C1=D1 gcc'=DB=CE=C1=D1 =C6=C9=DE=C1 =CF=C2=DF=D1=D7=CC=C5=CE= =C9=D1 =D3=D4=C5=CB=CF=D7=CF=C7=CF =CD=C1=D3=D3=C9=D7=C1 "=D0=C5=D2=C5=CD=C5=CE=CE=CF=CA" =C9=CC=C9 =D6=C5 "= =D0=C1=D2=C1=CD=C5=D4=D2=C9=DA=D5=C5=CD=CF=CA" =C4=CC=C9=CE=D9. =EB=C1=D6= =C5=D4=D3=D1, =DC=D4=C1 =C6=C9=DE=C1 =C5=D3=D4=D8 =D7 =D3=D4=C1=CE=C4=C1=D2=D4=C5 C99 (=CB=CF=D4=CF=D2=D9=CA gcc= =D0=CF=CB=C1 =CE=C5 =C4=CF =CB=CF=CE=C3=C1 =D0=CF=C4=C4=C5=D2=D6=C9=D7=C1= =C5=D4), =CE=CF =D4=D5=D4 =D7=D3=A3 =D2=C1=D7=CE=CF =CE=D5=D6=CE=CF =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5=DE= =DB=C5 =CE=C5 =C4=C5=CC=C1=D4=D8 =D7=CF=CF=C2=DD=C5. --hN1XGyM8GoU8K2XL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHTavRfBKgtDjnu0YRAmhLAKDmwLCJeVvvP0Q2eD/U7q8Y5P/i7wCg3lTp tCFqRzDmR0THq6NqHJTJohY= =z2fR -----END PGP SIGNATURE----- --hN1XGyM8GoU8K2XL--